SysTutorials Forums QA How to test whether a given path is a directory or a file in C++?

Viewing 0 reply threads

    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
    
Viewing 0 reply threads

The forum ‘QA’ is closed to new topics and replies.

Please share if you like this post: