Directory

An opaque structure representing an opened directory.

Constructors

this
this(GDir* gDir, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

close
void close()

Closes the directory and deallocates all related resources.

getDirectoryStruct
GDir* getDirectoryStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

readName
string readName()

Retrieves the name of another entry in the directory, or NULL. The order of entries returned from this function is not defined, and may vary by file system or other operating-system dependent factors.

rewind
void rewind()

Resets the given directory. The next call to g_dir_read_name() will return the first entry again.

Static functions

makeTmp
string makeTmp(string tmpl)

Creates a subdirectory in the preferred directory for temporary files (as returned by g_get_tmp_dir()).

open
Directory open(string path, uint flags)

Opens a directory for reading. The names of the files in the directory can then be retrieved using g_dir_read_name(). Note that the ordering is not defined.

Variables

gDir
GDir* gDir;

the main Gtk struct