Dir

class Dir(val glibDirPointer: <Error class: unknown class><<Error class: unknown class>>) : ProxyInstance(source)

An opaque structure representing an opened directory.

Constructors

Link copied to clipboard
constructor(path: String, flags: <Error class: unknown class>)

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.

constructor(glibDirPointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val glibDirPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val handle: <Error class: unknown class>

Functions

Link copied to clipboard
open override fun addCleaner(cleaner: <Error class: unknown class>): Boolean

Registers a cleaner to be executed when this proxy object is garbage collected.

Link copied to clipboard
fun close()

Closes the directory immediately and decrements the reference count.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Compare two proxy instances for equality. This will compare both the type of the instances, and their memory addresses.

Link copied to clipboard
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

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.

Link copied to clipboard
fun ref(): Dir

Increment the reference count of dir.

Link copied to clipboard
open override fun removeCleaner(cleaner: <Error class: unknown class>): Boolean

Removes a previously registered cleaner from this proxy object.

Link copied to clipboard
fun rewind()

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

Link copied to clipboard
fun unref()

Decrements the reference count of dir.