Package ch.bailu.gtk.glib
Klasse Dir
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.glib.Dir
- Alle implementierten Schnittstellen:
PointerInterface
An opaque structure representing an opened directory.
-
Feldübersicht
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
close()
Closes the directory immediately and decrements the reference count.static ClassHandler
static int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
static Str
Creates a subdirectory in the preferred directory for temporary
files (as returned by g_get_tmp_dir()).static Dir
Opens a directory for reading.static Dir
Opens a directory for reading.readName()
Retrieves the name of another entry in the directory, or %NULL.ref()
Increment the reference count of `dir`.void
rewind()
Resets the given directory.void
unref()
Decrements the reference count of `dir`.Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
Dir
-
-
Methodendetails
-
getClassHandler
-
openDir
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.- Parameter:
path
- the path to the directory you are interested in. On Unix in the on-disk encoding. On Windows in UTF-8flags
- Currently must be set to 0. Reserved for future use.- Gibt zurück:
- a newly allocated #GDir on success, %NULL on failure. If non-%NULL, you must free the result with g_dir_close() when you are finished with it.
- Löst aus:
AllocationError
-
openDir
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.- Parameter:
path
- the path to the directory you are interested in. On Unix in the on-disk encoding. On Windows in UTF-8flags
- Currently must be set to 0. Reserved for future use.- Gibt zurück:
- a newly allocated #GDir on success, %NULL on failure. If non-%NULL, you must free the result with g_dir_close() when you are finished with it.
- Löst aus:
AllocationError
-
close
public void close()Closes the directory immediately and decrements the reference count.
Once the reference count reaches zero, the `GDir` structure itself will be
freed. Prior to GLib 2.80, `GDir` was not reference counted.
It is an error to call any of the `GDir` methods other than
[method@GLib.Dir.ref] and [method@GLib.Dir.unref] on a `GDir` after calling
[method@GLib.Dir.close] on it. -
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.
%NULL may also be returned in case of errors. On Unix, you can
check `errno` to find out if %NULL was returned because of an error.
On Unix, the '.' and '..' entries are omitted, and the returned
name is in the on-disk encoding.
On Windows, as is true of all GLib functions which operate on
filenames, the returned name is in UTF-8.- Gibt zurück:
- The entry's name or %NULL if there are no more entries. The return value is owned by GLib and must not be modified or freed.
-
ref
Increment the reference count of `dir`.- Gibt zurück:
- the same pointer as `dir`
-
rewind
public void rewind()Resets the given directory. The next call to g_dir_read_name()
will return the first entry again. -
unref
public void unref()Decrements the reference count of `dir`.
Once the reference count reaches zero, the directory will be closed and all
resources associated with it will be freed. If [method@GLib.Dir.close] is
called when the reference count is greater than zero, the directory is closed
but the `GDir` structure will not be freed until its reference count reaches
zero.
It is an error to call any of the `GDir` methods other than
[method@GLib.Dir.ref] and [method@GLib.Dir.unref] on a `GDir` after calling
[method@GLib.Dir.close] on it. -
makeTmp
Creates a subdirectory in the preferred directory for temporary
files (as returned by g_get_tmp_dir()).
@tmpl should be a string in the GLib file name encoding containing
a sequence of six 'X' characters, as the parameter to g_mkstemp().
However, unlike these functions, the template should only be a
basename, no directory components are allowed. If template is
%NULL, a default template is used.
Note that in contrast to g_mkdtemp() (and mkdtemp()) @tmpl is not
modified, and might thus be a read-only literal string.- Parameter:
tmpl
- Template for directory name, as in g_mkdtemp(), basename only, or %NULL for a default template- Gibt zurück:
- The actual name used. This string should be freed with g_free() when not needed any longer and is is in the GLib file name encoding. In case of errors, %NULL is returned and @error will be set.
- Löst aus:
AllocationError
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-