File Operations


StatementFunction

chmod(permsn, f )

Sets the permissions of file f to the specified value.

truncate(filehandle, length) truncate(expr, length)

Truncates the file opened on filehandle or the file named by expr to the specified length.

mkdir(dirname, mode)

Makes a new directory with the name specified by dirname and the permissions specified by mode.

rename(filename, oldfilename)

Renames the file called oldfilename to filename.

rmdir(dirname)

Removes the directory named dirname.

stat(filename)

Queries the attributes of the file filename and returns a 13-value array containing the result of this query.

unlink(filename)

Deletes the name filename for a file that could have many names.