[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] small C_file_info request
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] small C_file_info request |
Date: |
Mon, 24 Jan 2005 23:43:42 +0100 |
On Mon, 24 Jan 2005 14:56:56 -0600 (CST), William Annis
<address@hidden> wrote:
>
> I've just spent a little time digging around posix.scm and runtime.c.
> You already have directory? and fifo? checks. Could you add
> symbolic-link? and regular-file? to a future version?
Sure.
> I don't
> understand the motivation for the C_file_info approach you've used, so
> I hesitate to poke at it myself just now.
>
(##sys#file-info FILENAME) returns a vector, where the 5th slot
contains the type (that's 3 for a fifo and should be 2 for a symbolic link).
Strangely, it returns 0 for a symbolic link right now, but I'll fix this.
##sys#file-info is admittedly ugly, but I needed something that could
stuff several file-specific pieces of information into a data-structure, while
being reasonable portable. It's just low-level code.
cheers,
felix