[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: Reading directories and files
Rajeev Rao molested the spacetime to project in our dimension:
> Hello,
> How does one contents of the current (or any) directory using C.
> How can I traverse the directory tree from a C program.
Try ftw, for details man ftw.
>
> How can one use fstat to know if a file is writeprotected to the
> respective user?
struct stat has a member of type mode_t which has the mode(protection) for
the particular file.
Shishir
--
"That's the problem with nature, something's always stinging you
or oozing mucous all over you. Let's go and watch TV."
--- Calvin