SysTutorials › Forums › QA › How to test whether a given path is a directory or a file in C++?
How to test whether a given path is a directory or a file in C++?
For example,
pathtype("/") --> "a dir"
pathtype("/tmp/file.txt") --> "a file" # if there is a file file.txt
pathtype("/tmp/dir.txt") --> "a dir" # if there is a dir named dir.txt
Related topics
Mar 24, 2018 at 7:54 pm