fs Module

absolute-path

'sym str

Returns the absolute path to 'sym.

absolute-path?

'sym bool

Returns true if 'sym is an absolute path.

append

str1 str2

Appends str1 to the end of file str2.

atime

'sym flt

Returns a timestamp corresponding to the time that file/directory 'sym was last accessed.

ctime

'sym flt

Returns a timestamp corresponding to the time that file/directory 'sym was created.

dir?

'sym bool

Returns true if the specified path 'sym exists and is a directory.

dirname

'sym str

Returns the path of the directory containing path 'sym.

exists?

'sym bool

Returns true if the specified file or directory 'sym exists.

expand-filename

'sym str

Returns the absolute path to the file name 'sym.

expand-symlink

'sym str

Returns the absolute path to the symlink 'sym (an error is raised if 'sym is not a symlink).

file?

'sym bool

Returns true if the specified path 'sym exists and is a file.

filename

'sym str

Returns the file name of path 'sym.

hidden?

'sym bool

Returns true if file/directory 'sym is hidden, false otherwise.

join-path

quot str

Joins the strings contained in quot with /.

mtime

'sym flt

Returns a timestamp corresponding to the time that file/directory 'sym was last modified.

normalized-path

'sym str

Returns the normalized path to 'sym.

permissions

'sym int

Returns the Unix permissions (expressed as a three-digit number) of file/directory 'sym.

read

str str

Reads the file str and puts its contents on the top of the stack as a string.

relative-path

'sym1 'sym2 str

Returns the path of 'sym1 relative to 'sym2.

size

'sym int

Returns the size in bytes of file/directory 'sym.

stats

'sym dict

Returns a dictionary dict containing information on file/directory 'sym.

symlink?

'sym bool

Returns true if the specified path 'sym exists and is a symbolic link.

type

'sym str

Returns the type of file/directory 'sym ("file" or "dir").

unix-path

'sym str

Converts all backslashes in 'sym to slashes.

windows-path

'sym str

Converts all slashes in 'sym to backslashes.

write

str1 str2

Writes str1 to the file str2, erasing all its contents first.