Deutsch English Français Italiano |
<20250521121507.235@kylheku.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Kaz Kylheku <643-408-1753@kylheku.com> Newsgroups: comp.lang.c Subject: Re: encapsulating directory operations Date: Wed, 21 May 2025 19:31:13 -0000 (UTC) Organization: A noiseless patient Spider Lines: 48 Message-ID: <20250521121507.235@kylheku.com> References: <100h650$23r5l$1@dont-email.me> <20250520065158.709@kylheku.com> <100i2la$292le$1@dont-email.me> <87a5770xjw.fsf@nosuchdomain.example.com> <100j09o$2f04b$1@dont-email.me> <87tt5ezx9y.fsf@nosuchdomain.example.com> <100j4t3$2foah$1@dont-email.me> <87ldqqzfj0.fsf@nosuchdomain.example.com> <100kak8$2q0s6$1@dont-email.me> Injection-Date: Wed, 21 May 2025 21:31:13 +0200 (CEST) Injection-Info: dont-email.me; posting-host="fb9d07d77f399b69ba9c9af9886af57e"; logging-data="3155853"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+BZTuiWjEVwbO+B9Q3xJWBRgxDowDE9Uw=" User-Agent: slrn/pre1.0.4-9 (Linux) Cancel-Lock: sha1:UWLzinuHCbfoVy7GDL+jy4kD31M= Bytes: 3503 On 2025-05-21, Paul Edwards <mutazilah@gmail.com> wrote: > I don't need an official endorsement. What I need to know > is that you can't think of any philosophical reason that the > C90 committee shouldn't have done that - had they chosen > to do so. That's like a double recursion: taking us into a subjunctive derived from an unrealized past! I think all the pieces are in the discussion until now to identify why it would have been a bad idea for C90 to try to provide directory access. A one-size fits all solution could easily have low fidelity for real programs whose users demand detailed platform integration, or else it could be a mess full of options and details that try to cover every system, but don't make sense on most of them. Common Lisp's pathnames are a good example of the latter. It's a complicated feature which has details that map to exotic filesystems that are no longer in use. MOreover, different implementations of Common Lisp for the same host systems vary in how they map certain details of pathname objects to the host operating system. For instance given the suffix .tar.gz on POSIX, one pathname implementations might treat just the "gz" as a the type attribute, whereas another might treat "tar.gz" as the type attribute. I think that if you're making some self-contained solution that must havce a hierarchical file system, and has to be in C90, then just code up a filesystem that exists entirely within one file that you can open for updating in binary mode using fopen("....", "r+b") and within which you create all the needed structure. Then you need not have a shred of anything system-specific in your file code. As an almost completely separate project, you could write a FUSE (filesystem in user space) module for Linux that would allow users to mount your filesystem image. This way images could be manipulated by something other than your software, which could come in handy. If you impelment an existing filesystem (like FAT32 or whatever) then that works is already done. Given a file containing a FAT32 image, you can mount that on existing operating systems. That could help you in your development. -- TXR Programming Language: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal Mastodon: @Kazinator@mstdn.ca