[plt-scheme] Where to find out that library objects like "chmod" are available in the underlying implementation?
On Thu, Oct 2, 2008 at 10:43 PM, Ernie Smith <esmith at acanac.net> wrote:
> Now here are my questions:
>
> 1- Where would I have needed to look to find out that "chmod" is available
> like that when the lib argument is #f?
It isn't directly stated, but if you read:
If path is #f, then the resulting foreign-library value represents
all libraries loaded in the current process, including libraries
previously opened with ffi-lib. In particular, use #f to access
C-level functionality exported by the run-time system (as described in
Inside: PLT Scheme C API).
http://docs.plt-scheme.org/foreign/Loading_Foreign_Libraries.html
you can make the reasonable inference that the C standard library libc
(and the GNU extension glibc [http://en.wikipedia.org/wiki/Glibc])
will be there on Unix.
> 2- What other underlying system calls are available?
All of them.
> 2- This inspires someone on the PLT team to come up with an improved
> (fold-files ..) that makes the desire for "stat" ffi calls at this level
> go away.
>
> BTW I'm still on 372
There's a contradiction here :)
N.