Sujet : Re: encapsulating directory operations
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 20. May 2025, 10:18:54
Autres entêtes
Organisation : None to speak of
Message-ID : <87ecwj1vy9.fsf@nosuchdomain.example.com>
References : 1
User-Agent : Gnus/5.13 (Gnus v5.13)
"Paul Edwards" <
mutazilah@gmail.com> writes:
Someone (Jean-Marc) wrote some "folder" routines which I like a lot.
You can see them here:
>
https://sourceforge.net/p/pdos/gitcode/ci/master/tree/hwzip/folder.c
>
And in essence, when you read from a directory, the only
thing you get is the filename. If it is actually a subdirectory,
then that is indicated with a "/" at the end of the filename.
>
Other things like size and creation date are not available,
and C90 does not guarantee that such concepts even
exist. C90 does guarantee that files exist though.
C90, like all later standards, supports file operations only in hosted
implementations, not in freestanding implementations. Even on a
conforming hosted implementation, every call to fopen() could fail.
[...]
And C90 (etc) could potentially be extended to include a folder.h
C90 will never be extended. It was made obsolete by C99, which was made
obsolete by C11, which was made obsolete by C23. You're free to invent
your own language based on C90 if you like, but C went in a different
direction decades ago.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */