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 2
    author
    cowan
    comment
    
    ipnr
    98.14.172.204
    name
    DirectoryPortsCowan
    readonly
    0
    text
    == Directory ports ==
This module depends on the acceptance of PortsCowan or something like it, as it uses the framework of that proposal.
== Procedures ==
`(directory? `''filename''`)`
Returns `#t` if ''filename'' is the name of a directory.  ''Filename'' is a string or an implementation-dependent object.
`(open-directory `''filename''`)`
''Filename'' can be a string or a ''settings list'' as described in PortsCowan.  In addition to the keys `path` and `encoding` specified there, the key `hidden` can have the values `#f` (no hidden files), `#t` (all files), and `dots` (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.
The returned value is an input port, but it is neither a binary port nor a character port, so the only procedure callable on it is `read`, which returns the next available filename as a string (or, when necessary, an implementation-dependent object).  Filenames are returned in arbitrary order.  Directory ports are a disjoint type.
`(directory-port? `''obj''`)`
Returns `#t` if ''obj'' is a directory port.
    time
    2010-09-23 10:08:59
    version
    2