Re: Directory contents.
From: Kasper Dupont (kasperd_at_daimi.au.dk)
Date: 04/03/05
- Next message: Dave Farrance: "Simplest C++ Line Drawing"
- Previous message: Steve Kirkendall: "Re: Directory contents."
- In reply to: Måns Rullgård: "Re: Directory contents."
- Next in thread: Måns Rullgård: "Re: Directory contents."
- Reply: Måns Rullgård: "Re: Directory contents."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 03 Apr 2005 12:07:27 +0200
Måns Rullgård wrote:
>
> Lorenzo Vaina <ducadimarteNOSPAM@toglimi-katamail.com> writes:
>
> > I'm developing a function in C that have to do something like "ls -R".
> > I tried using scandir() but i don't know how distinguish regular files by
> > other file and regular file against directory, over all.
> > Have you any suggestion, please?
>
> man stat
On my system that command will not give the desired
man page. It will give me stat(1), however in this
particular case it is really stat(2), which is of
interest. Actually I think stat is not even the
right function to use for this, lstat should be used
instead. So try:
man 2 lstat
(or just man lstat, since there usually isn't any
lstat man page in section 1.)
-- Kasper Dupont
- Next message: Dave Farrance: "Simplest C++ Line Drawing"
- Previous message: Steve Kirkendall: "Re: Directory contents."
- In reply to: Måns Rullgård: "Re: Directory contents."
- Next in thread: Måns Rullgård: "Re: Directory contents."
- Reply: Måns Rullgård: "Re: Directory contents."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|