- public bool get_contents (string filename, out string contents, out size_t length = null) throws FileError
- public bool set_contents (string filename, string contents, ssize_t length = -1) throws FileError
- public bool get_data (string filename, out uint8[] contents) throws FileError
Reads an entire file into allocated memory, with good error checking.
- public bool set_data (string filename, uint8[] contents) throws FileError
Writes all of contents
to a file named filename
, with good error checking.
- public bool test (string filename, FileTest test)
Returns true if any of
the tests in the bitfield test
are true.
- public int open_tmp (string tmpl, out string name_used) throws FileError
Opens a file for writing in the preferred directory for temporary
files (as returned by get_tmp_dir).
- public string read_link (string filename) throws FileError
Reads the contents of the symbolic link filename
like the
POSIX readlink
function.
- public int error_from_errno (int err_no)
Gets a FileError
constant based on the passed-in err_no
.
- public int mkstemp (string tmpl)
Opens a temporary file.
- public int rename (string oldfilename, string newfilename)
- public int remove (string filename)
- public int unlink (string filename)
A wrapper for the POSIX unlink
function.
- public int chmod (string filename, int mode)
- public int utime (string filename, UTimBuf? times = null)
- public int symlink (string oldpath, string newpath)
- public int close (int fd)