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
Reply To: How to test whether a given path is a directory or a file in C++?
Your information:





<a href="" title="" rel="" target=""> <blockquote cite=""> <code> <pre> <em> <strong> <del datetime=""> <ul> <ol start=""> <li> <img src="" border="" alt="" height="" width="">

Please share if you like this post: