[Larceny-users] Request: string-port? predicate

William D Clinger will at ccs.neu.edu
Tue Jun 28 13:17:28 EDT 2016


KenD wrote:

> It would be useful to test an output-port to see if get-output-string can be applied.

Yes.  A temporary workaround can be found at:

https://github.com/larcenists/larceny/issues/772

> It would also be useful to know the byte-length of a file, and deal with directory and file entries..

In R5RS mode:

    (require 'file-system)
    (require 'file-utils)

The first of those gives you file-length, file-directory?, and
a few other things.  The second gives you some higher-level stuff
like diff.  The source code is in lib/Standard/file-system.sch
and file-utils.sch.

In R7RS mode, use r5rs:require instead of plain require before
importing the stuff you need:

(import (primitives r5rs:require))
(r5rs:require 'file-system)
(import (primitives file-length))

Will



More information about the Larceny-users mailing list