Next Previous Up Top Contents Index

8 The File-System Module

8.6 Finding out file information

Several interfaces in the File-System module allow you to interrogate files for information. You can find out whether a file exists, what its name is, or which directory it resides in, and you can find the current properties of the file.

file-exists?

Function

file-exists? file => exists?

Returns true if file exists, false otherwise. If file is actually a link, then file-exists checks the target of the link, and returns true if the target exists.
file-properties

Function

file-properties file => properties

Returns all the properties of the specified file. The properties are returned as a concrete subclass of <explicit-key-collection>.
file-property

Sealed generic function

file-property file key => property 

Returns a particular property of the specified file. The property returned is dependent on the value of key, and as such, may be of a number of types. For more information about the possible values of key, see file-property-setter, page 168.
file-type

Function

file-type file => file-type

Returns the file type of the entity specified by file, as an instance of <file-type>. A given entity can either be a file, a directory, or a link to a file or directory.

System and I/O Reference - 31 MAR 2000

Next Previous Up Top Contents Index