* Re: opening a directory, and reading it's contents
2002-08-31 0:45 opening a directory, and reading it's contents Nick Jennings
@ 2002-08-31 0:44 ` Glynn Clements
0 siblings, 0 replies; 2+ messages in thread
From: Glynn Clements @ 2002-08-31 0:44 UTC (permalink / raw)
To: Nick Jennings; +Cc: linux-c-programming
Nick Jennings wrote:
> I can't seem to find the function I am looking for. I'd like to
> open a directory for reading, and iterate through the contents of
> it (filenames, directories etc).
>
> Is there a platoform independant way to do this?
opendir/readdir/closedir works on all Unix-like systems; that's as
portable as it gets.
> What's the linux-specific way to do it?
There isn't one.
There is getdents() but, although this is less portable than the
above, it isn't actually Linux-specific.
--
Glynn Clements <glynn.clements@virgin.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
* opening a directory, and reading it's contents
@ 2002-08-31 0:45 Nick Jennings
2002-08-31 0:44 ` Glynn Clements
0 siblings, 1 reply; 2+ messages in thread
From: Nick Jennings @ 2002-08-31 0:45 UTC (permalink / raw)
To: linux-c-programming
Hi,
I can't seem to find the function I am looking for. I'd like to
open a directory for reading, and iterate through the contents of
it (filenames, directories etc).
Is there a platoform independant way to do this?
What's the linux-specific way to do it?
Any elaboration welcome, thanks.
- Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-31 0:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-31 0:45 opening a directory, and reading it's contents Nick Jennings
2002-08-31 0:44 ` Glynn Clements
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).