previous up next     contents index
Next: Utilities Up: Libraries Previous: Structures

Files

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

 

(build-absolute-path base path ...) (procedure)

Like  build-path, but base is required to be an absolute pathname. If base is not an absolute pathname, error is called.

 

(build-relative-path base path ...) (procedure)

Like  build-path, but base is required to be a relative pathname. If base is not a relative pathname, error is called.

 

(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. If path is

 

(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-relative-path basepath path) (procedure)

Finds a relative pathname with respect to basepath that names the same file as path. Both basepath and path must be normalized (see normalize-path below).

 

(load-recent path scheme-ext) (procedure)

Loads a Scheme file or a compiled Scheme file, whichever is the most recent, choosing the compiled file if neither is more recent. The path pathname should not include a suffix. The scheme-ext argument specifies the suffix used for uncompiled files; it defaults to ``.ss''. (Compiled files must always end with ``.zo''.) The load/cd procedure is used to load the file.

 

(normalize-path path wrt) (procedure)

Returns a normalized, absolute 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 working 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: Utilities Up: Libraries Previous: Structures

PLT