Sujet : Re: encapsulating directory operations
De : mutazilah (at) *nospam* gmail.com (Paul Edwards)
Groupes : comp.lang.cDate : 20. May 2025, 10:33:18
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <100hi93$260r8$1@dont-email.me>
References : 1 2
User-Agent : Microsoft Outlook Express 6.00.2800.1106
"Lawrence D'Oliveiro" <
ldo@nz.invalid> wrote in message
news:100hase$24odp$1@dont-email.me...On Tue, 20 May 2025 16:06:19 +1000, Paul Edwards wrote:
>
And in essence, when you read from a directory, the only thing you get
is the filename.
>
You want at least the type of entry as well, surely.
>
<https://manpages.debian.org/readdir(3)>
No - I'm not attempting to support such sophistication.
If it is actually a subdirectory, then that is
indicated with a "/" at the end of the filename.
>
What if it's a symlink to a directory?
I guess that can be left as "implementation-defined". I would
treat it the same as a hardlink, ie a directory.
Now C90 doesn't have folder/directory operations (such as opendir()) for
a reason.
>
Surely OSes that don't support hierarchical directories are only fit for
the museum nowadays.
As far as I am aware, IBM mainframes are the most important
systems on the planet. The only professional ones too. Everything
else is a clown show.
If you wish, you can quibble and say "oh, modern IBM mainframes
support this bolted on system that has hierarchical directories". But
you can say that about anything. The Commodore 64 supports a
hierarchical directory system if you bolt on the same thing that
an IBM mainframe bolts on too.
Ironically, the Commodore 64 really does have bolted on system
that supports a hierarchical directory system - a CMD hard drive.
BFN. Paul.