'i/o-extensions is provided (by linking in ioext.o),
Line I/O, and the following functions are defined:
Returns a vector of integers describing the argument. The argument can be either a string or an open input port. If the argument is an open port then the returned vector describes the file to which the port is opened; If the argument is a string then the returned vector describes the file named by that string. If there exists no file with the name string, or if the file cannot be accessed
#fis returned. The elements of the returned vector are as follows:
- 0 st_dev
- ID of device containing a directory entry for this file
- 1 st_ino
- Inode number
- 2 st_mode
- File type, attributes, and access control summary
- 3 st_nlink
- Number of links
- 4 st_uid
- User ID of file owner
- 5 st_gid
- Group ID of file group
- 6 st_rdev
- Device ID; this entry defined only for char or blk spec files
- 7 st_size
- File size (bytes)
- 8 st_atime
- Time of last access
- 9 st_mtime
- Last modification time
- 10 st_ctime
- Last file status change time
If the file with name name already exists, return
#f, otherwise try to create and open the file like
try-open-file, See Files and Ports. If the optional integer argument perms is provided, it is used as the permissions of the new file (modified by the current umask).
Closes port port and reopens it with filename and modes.
Creates and returns a duplicate port from port. Duplicate unbuffered ports share one file position. modes are as for open-file.
Closes to-port and makes to-port be a duplicate of from-port.
redirect-port!returns to-port if successful,
#fif not. If unsuccessful, to-port is not closed.
Returns a directory object corresponding to the file system directory named dirname. If unsuccessful, returns
Returns the string name of the next entry from the directory dir. If there are no more entries in the directory,
Reinitializes dir so that the next call to
readdirwith dir will return the first entry in the directory again.
Closes dir and returns
#t. If dir is already closed,,
proc must be a procedure taking one argument. ‘Directory-For-Each’ applies proc to the (string) name of each file in directory. The dynamic order in which proc is applied to the filenames is unspecified. The value returned by ‘directory-for-each’ is unspecified. — Function: directory-for-each proc directory pred
Applies proc only to those filenames for which
)would return a non-false value (see Filenames).(require 'directory) (directory-for-each print "." "[A-Z]*.scm") -| "Init.scm" "Iedline.scm" "Link.scm" "Macro.scm" "Transcen.scm" "Init5e7.scm"
path-glob is a pathname whose last component is a (wildcard) pattern (see Filenames). proc must be a procedure taking one argument. ‘directory*-for-each’ applies proc to the (string) name of each file in the current directory. The dynamic order in which proc is applied to the filenames is unspecified. The value returned by ‘directory*-for-each’ is unspecified.
mkdirfunction creates a new, empty directory whose name is path. The integer argument mode specifies the file permissions for the new directory. See The Mode Bits for Access Permission, for more information about this.
mkdirreturns if successful,
rmdirfunction deletes the directory path. The directory must be empty before it can be removed.
rmdirreturns if successful,
Changes the current directory to filename. If filename does not exist or is not a directory,
#fis returned. Otherwise,
getcwdreturns a string containing the absolute file name representing the current working directory. If this string cannot be obtained,
Renames the file specified by oldfilename to newfilename. If the renaming is successful,
#tis returned. Otherwise,
Copies the file specified by oldfilename to newfilename. If the copying is successful,
#tis returned. Otherwise,
chmodsets the access permission bits for the file named by file to mode. The file argument may be a string containing the filename or a port open to the file.
chmodreturns if successful,
Sets the file times associated with the file named pathname to have access time acctime and modification time modtime.
utimereturns if successful,
umasksets the file creation mask of the current process to mask, and returns the previous value of the file creation mask.
Returns the integer file descriptor associated with the port port. If an error is detected,
#tif the file named by pathname can be accessed in the way specified by the how argument. The how argument can be the
logiorof the flags:
Or the how argument can be a string of 0 to 3 of the following characters in any order. The test performed is the
andof the associated tests and
Transfers control to program command called with arguments arg0 .... For
execl, command must be an exact pathname of an executable file.
execlpsearches for command in the list of directories specified by the environment variable PATH. The convention is that arg0 is the same name as command.
execlpexcept that the set of arguments to command is arglist.
adds or removes definitions from the environment. If the string is of the form ‘NAME=VALUE’, the definition is added to the environment. Otherwise, the string is interpreted as the name of an environment variable, and any definition for this variable in the environment is removed.
Names of environment variables are case-sensitive and must not contain the character
=. System-defined environment variables are invariably uppercase.
Putenvis used to set up the environment before calls to
To access environment variables, use