[plt-scheme] Where to find out that library objects like "chmod" are available in the underlying implementation?

From: Noel Welsh (noelwelsh at gmail.com)
Date: Fri Oct 3 02:45:00 EDT 2008

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).


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 :)


Posted on the users mailing list.