Quantcast
Channel: Retrieving file/directory name from stdin
Viewing all articles
Browse latest Browse all 7

Retrieving file/directory name from stdin

$
0
0

I'm working on a command line application that accepts input via stdin redirection.
I want to add a feature that checks if the provided input is a directory. For example, if a directory is passed via redirection, it should be able to detect it.

For example,

$ ./app < d
d is a directory
$./app < f
f is not a directory

How can I check if the input is a directory? are there any libraries?

Read full topic


Viewing all articles
Browse latest Browse all 7

Trending Articles