[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: Reading directories and files
Rajeev Rao wrote:
> Hello,
> How does one contents of the current (or any) directory using C.
> How can I traverse the directory tree from a C program.
I hope ftw() will solve this
>
>
> If I locate a file in a given directory(after a random set of traversals) is
> there a way to obtain its absolute path in the form of a string?
>
ftw() will give you the path you need not worry about it.
>
> How can one use fstat to know if a file is writeprotected to the
> respective user?
>
use access()
Bye
Sumit