Re: File mode: char/block special files and permission bits Lassi Kortela (31 Jul 2019 15:32 UTC)
Re: File mode: char/block special files and permission bits Lassi Kortela 31 Jul 2019 15:32 UTC
> That turns out to be a problem in the description, where I say
> "Returns ... mode (permission bits).... " I should either add
> something before the close paren, or drop the parenthetical comment.
> Except for that error, the SRFI, and the Chibi Scheme implementation
> of it return all the bits, which are necessary for the following
> file-info-directory?, file-info-fifo? etc. predicates, no masking is
> intended to be specified in the SRFI.
Speaking from experience: the fact that the mode bits contain both
permissions and file type is a perennial source of confusion in the OS
APIs of many languages. It's a historical accident that's only intuitive
to Unix diehards.
I would suggest giving access to the full mode bits as Göran suggests,
but name them something stupidly obvious like
There could additionally be separate procedures: