This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Source for wiki DirectoryPortsCowan version 8

author

cowan

comment


    

ipnr

98.14.173.81

name

DirectoryPortsCowan

readonly

0

text

== Directory ports ==

This proposal depends on SettingsListsCowan.  See DirectoriesCowan for a proposal for creating and destroying directories.

== Procedures ==

`(open-directory `''filename''`)`

Returns a ''directory port''. It is not defined whether `port?` and `input-port?` return `#t` or `#f` to a directory port.

''Filename'' can be a string or a ''settings list'' as described in SettingsListsCowan.  In addition to the keys `path` and `encoding` specified there, the key `hidden` can have the values `none` (don't expose hidden files), `all` (expose all files), and `dots` (expose all files except `.` and `..`).  On Posix systems, hidden files have names beginning with `.`; on Windows, hidden files are named `.`, `..`, or have the `hidden` file attribute.  

`(directory-port? `''obj''`)`

Returns `#t` if ''obj'' is a directory port.  Directory ports are a disjoint type.

`(read-directory `''directory-port''`)`

Returns the next available filename as a string (or, when necessary, an implementation-dependent object).  If no filenames are available, returns an eof-object.  Filenames are returned in arbitrary order.

time

2012-06-04 09:02:22

version

8