| temporary-file-name | STKLOS Procedure |
Generates a unique temporary file name. The value returned by
temporary-file-name is the newly generated name of #f
if a unique name cannot be generated.
|
| rename-file string1 string2 | STKLOS Procedure |
Renames the file whose path-name is string1 to a file whose path-name is
string2. The result of rename-file is void.
|
| remove-file string | STKLOS Procedure |
Removes the file whose path name is given in string.
The result of remove-file is void.
|
| copy-file string1 string2 | STKLOS Procedure |
Copies the file whose path-name is string1 to a file whose path-name is
string2. If the file string2 already exists, its content prior
the call to copy-file is lost. The result of copy-file is void.
|
| file-is-directory? string | STKLOS Procedure |
| file-is-regular? string | STKLOS Procedure |
| file-is-readable? string | STKLOS Procedure |
| file-is-writable? string | STKLOS Procedure |
| file-is-executable? string | STKLOS Procedure |
| file-exists? string | STKLOS Procedure |
Returns #t if the predicate is true for the path name given in
string; returns #f otherwise (or if string denotes a file
which does not exist).
|
| getcwd | STKLOS Procedure |
| Returns a string containing the current working directory. |
| chmod str | STKLOS Procedure |
| chmod str option1 ... | STKLOS Procedure |
Change the access mode of the file whose path name is given in string.
The options must be composed of either an integer or one of the
following symbols read, write or execute. Giving no option to chmod
is equivalent to pass it the integer 0. If the operation succeeds,
chmod returns #t; otherwise it returns #f.
(chmod "~/.stklos/stklosrc" 'read 'execute)
(chmod "~/.stklos/stklosrc" #o644)
|
| chdir dir | STKLOS Procedure |
Changes the current directory to the directory given in string dir.
|
| expand-file-name path | STKLOS Procedure |
Expand-file-name expands the filename given in path to
an absolute path.
;; Current directory is ~eg/STklos (i.e. /users/eg/STklos)
(expand-file-name "..") => "/users/eg"
(expand-file-name "~eg/../eg/bin") => "/users/eg/bin"
(expand-file-name "~/STklos)" => "/users/eg/STk"
|
| canonical-file-name path | STKLOS Procedure |
Expands all symbolic links in path and returns its canonicalized
absolute path name. The resulting path does not have symbolic links.
If path doesn't designate a valid path name, canonical-file-name
returns #f.
|
| decompose-file-name string | STKLOS Procedure |
Returns an "exploded" list of the path name components given in
string.
The first element in the list denotes if the given string is an
absolute path or a relative one, being "/" or "." respectively.
Each component of this list is a string.
(decompose-file-name "/a/b/c.stk") => ("/" "a" "b" "c.stk")
(decompose-file-name "a/b/c.stk") => ("." "a" "b" "c.stk")
|
| winify-file-name fn | STKLOS Procedure |
On Win32 system, when compiled with the Cygwin environment,
file names are internally represented in a POSIX-like internal form.
Winify-file-bame permits to obtain back the Win32 name of an interned
file name
(winify-file-name "/Z/temp")
=> "Z:\\temp"
(list (getcwd) (winify-file-name))
=> ("//saxo/homes/eg/Projects/STklos"
"\\\\saxo\\homes\\eg\\Projects\\STklos")
|
| basename str | STKLOS Procedure |
Returns a string containing the last component of the path name
given in str.
(basename "/a/b/c.stk") => "c.stk"
|
| dirname str | STKLOS Procedure |
Returns a string containing all but the last component of the path
name given in str.
(dirname "/a/b/c.stk") => "/a/b"
|
| file-separator | STKLOS Procedure |
| Retuns the operating system file file separator as a character. |
| make-path dirname name | STKLOS Procedure |
Builds a file name from the directory dirname and name.
|
| glob pattern ... | STKLOS Procedure |
Glob performs file name "globbing" in a fashion similar to the
csh shell. Glob returns a list of the filenames that match at least
one of pattern arguments. The pattern arguments may contain
the following special characters:
As with csh, a '.' at the beginning of a file's name or just after
a '/ must be matched explicitly or with a If the first character in a pattern is '~' then it refers to the home directory of the user whose name follows the '~'. If the '~' is followed immediately by `/' then the value of the environment variable HOME is used.
|