File: is_dir_c%2B%2B.C

package info (click to toggle)
libslow5lib 0.7.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 25,092 kB
  • sloc: ansic: 11,825; python: 1,179; sh: 547; makefile: 91; cpp: 40
file content (14 lines) | stat: -rw-r--r-- 289 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <sys/types.h>
#include <dirent.h>
#include <stdlib.h>
#include <string>

int main(int argc, char **argv) {
    std::string f_name = argv[1];
    auto dir = opendir(f_name.c_str());
    if(not dir) {
        return EXIT_FAILURE;
    }
    closedir(dir);
    return EXIT_SUCCESS;
}