• C

Read a file following $PATH

How do I read a file following $PATH if it is not in current directory. I mean, are there methods to easily do that instead of dissecting $PATH string and try to find the file directory by directory? Thanks!
Who is Participating?
rbrConnect With a Mentor Commented:
Send an email to rbr@tip-informatik.at
and I will send you an example.
paiAuthor Commented:
Adjusted points from 50 to 100
For which OS. There are no ansi function which will do this. The POSIc function for these are

opendir, readdir, scandir, closedir, ...
paiAuthor Commented:
Sorry, I forgot to mention it is in Linux. Could you give an outlined example as how it works?
paiAuthor Commented:
The answer is good. You should post it here.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.