fname.spad line 1 [edit on github]
This category provides an interface to names in the file system.
coerce(s)
converts a string to a file name according to operating system-dependent conventions.
coerce(fn)
produces a string for a file name according to operating system-dependent conventions.
directory(f)
returns the directory part of the file name.
exists?(f)
tests if the file exists in the file system.
extension(f)
returns the type part of the file name.
filename(d, n, e)
creates a file name with d
as its directory, n
as its name and e
as its extension. This is a portable way to create file names. When d
or t
is the empty string, a default is used.
name(f)
returns the name part of the file name.
new(d, pref, e)
constructs the name of a new writable file with d
as its directory, pref
as a prefix of its name and e
as its extension. When d
or t
is the empty string, a default is used. An error occurs if a new file cannot be written in the given directory.
readable?(f)
tests if the named file exist and can it be opened for reading.
writable?(f)
tests if the named file be opened for writing. The named file need not already exist.