[previous] [up] [next]     [contents] [index]
Next: Functions Up: MzLib Libraries Previous: Structures

Filesystem

Files: file.ss, fileu.ss, filer.ss, files.ss, filec.ss
Requires: strings.ss
Opened form requires: stringu.ss
Signature: mzlib:file^
Unit: mzlib:file@, imports mzlib:string^

See also section 11.2.



(build-absolute-path base path tex2html_wrap_inline12550 ) PROCEDURE

Like build-path (see section 11.2), but base is required to be an absolute pathname. If base is not an absolute pathname, error is called.



(build-relative-path base path tex2html_wrap_inline12550 ) PROCEDURE

Like build-path (see section 11.2), but base is required to be a relative pathname. If base is not a relative pathname, error is called.



(delete-directory/files path) PROCEDURE

Deletes the file or directory specified by path. If path is a directory, then delete-directory/files is first applied to each file and directory in path before the directory is deleted. If path cannot be deleted, the exn:user exception is raised, otherwise void is returned.



(explode-path path) PROCEDURE

Returns the list of directories that constitute path. The path argument must be normalized (see normalize-path below).



(file-name-from-path path) PROCEDURE

If path is a file pathname, returns just the file name part without the directory path.



(filename-extension path) PROCEDURE

Returns a string that is the extension part of the filename in path. If path is (syntactically) a directory, #f is returned.



(find-library name collection) PROCEDURE

Returns the path of the specified library (see Chapter 15), returning #f if the specificed library or collection cannot be found. The collection argument is optional, defaulting to "mzlib".



(find-relative-path basepath path) PROCEDURE

Finds a relative pathname with respect to basepath that names the same file or directory as path. Both basepath and path must be normalized (see normalize-path below). If path is not a proper subpath of basepath (i.e., a subpath that is strictly longer), path is returned.



(make-temporary-file [format-string]) PROCEDURE

Creates a new temporary file and returns the path of the file. (Instead of just generating a fresh file name, the file is actually created. This prevents other threads or processes from picking the same temporary name.)

If format-string is specified, it must be a format string suitable for use with format and one additional argument. The default format-string is "mztmp~a".



(normalize-path path wrt) PROCEDURE

Returns a normalized, complete version of path, expanding the path and resolving all soft links. If path is relative, then the pathname wrt is used as the base path. The wrt argument is optional; if is omitted, then the current directory is used as the base path.

Letter case is not normalized by normalize-path, so combine normalize-path with normal-case-path to get strings for path comparison.

An error is signaled by normalize-path if the input path contains an embedded path for a non-existant directory, or if an infinite cycle of soft-links is detected.



(path-only path) PROCEDURE

If path is a filename, the file's path is returned. If path is syntactically a directory, #f is returned.


[previous] [up] [next]     [contents] [index]
Next: Functions Up: MzLib Libraries Previous: Structures

PLT