-
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 g_get_tmp_dir())
.
-
public string read_link (string filename) throws FileError
-
public int error_from_errno (int err_no)
Gets a GFileError constant based on the passed-in errno.
-
public int mkstemp (string tmpl)
Opens a temporary file.
-
public int rename (string oldfilename, string newfilename)
The rename() function renames a file, moving it between directories if required.
-
public int remove (string filename)
The remove() function deletes a name from the filesystem.
-
public int unlink (string filename)
A wrapper for the POSIX unlink() function.
-
public int chmod (string filename, int mode)
The chmod() function is used to set the permissions of a file system object.
-
public int symlink (string oldpath, string newpath)
-
public int close (int fd)
GLib.FileUtils.close closes a file descriptor, so that it no longer refers to
any file and may be reused.