Package org.gnome.gio
Class UnixMountPoint
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gio.UnixMountPoint
- All Implemented Interfaces:
Proxy
Defines a Unix mount point (e.g.
/dev
).
This corresponds roughly to a fstab entry.-
Constructor Summary
ConstructorDescriptionUnixMountPoint
(MemorySegment address) Create a UnixMountPoint proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionstatic UnixMountPoint
Gets aGUnixMountPoint
for a given mount path.int
compare
(UnixMountPoint mount2) Compares two unix mount points.copy()
Makes a copy of this UnixMountPoint.void
free()
Frees a unix mount point.Gets the device path for a unix mount point.Gets the file system type for the mount point.Gets the mount path for a unix mount point.Gets the options for the mount point.static Type
getType()
Get the GType of the UnixMountPoint classboolean
Guesses whether a Unix mount point can be ejected.Guesses the icon of a Unix mount point.Guesses the name of a Unix mount point.Guesses the symbolic icon of a Unix mount point.boolean
Checks if a unix mount point is a loopback device.boolean
Checks if a unix mount point is read only.boolean
Checks if a unix mount point is mountable by the user.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
UnixMountPoint
Create a UnixMountPoint proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
Method Details
-
getType
-
at
public static UnixMountPoint at(String mountPath, @Nullable @Nullable Out<Long> timeRead) throws UnsupportedPlatformException Gets aGUnixMountPoint
for a given mount path. IftimeRead
is set, it will be filled with a unix timestamp for checking if the mount points have changed since with g_unix_mount_points_changed_since().If more mount points have the same mount path, the last matching mount point is returned.
- Parameters:
mountPath
- path for a possible unix mount point.timeRead
- guint64 to contain a timestamp.- Returns:
- a
GUnixMountPoint
, ornull
if no match is found. - Throws:
UnsupportedPlatformException
- when run on a platform other than linux or macos
-
compare
Compares two unix mount points.- Parameters:
mount2
- aGUnixMount
.- Returns:
- 1, 0 or -1 if this UnixMountPoint is greater than, equal to,
or less than
mount2
, respectively.
-
copy
-
free
public void free()Frees a unix mount point. -
getDevicePath
Gets the device path for a unix mount point.- Returns:
- a string containing the device path.
-
getFsType
Gets the file system type for the mount point.- Returns:
- a string containing the file system type.
-
getMountPath
Gets the mount path for a unix mount point.- Returns:
- a string containing the mount path.
-
getOptions
Gets the options for the mount point.- Returns:
- a string containing the options.
-
guessCanEject
public boolean guessCanEject()Guesses whether a Unix mount point can be ejected.- Returns:
true
if this UnixMountPoint is deemed to be ejectable.
-
guessIcon
-
guessName
Guesses the name of a Unix mount point. The result is a translated string.- Returns:
- A newly allocated string that must be freed with g_free()
-
guessSymbolicIcon
-
isLoopback
public boolean isLoopback()Checks if a unix mount point is a loopback device.- Returns:
true
if the mount point is a loopback.false
otherwise.
-
isReadonly
public boolean isReadonly()Checks if a unix mount point is read only.- Returns:
true
if a mount point is read only.
-
isUserMountable
public boolean isUserMountable()Checks if a unix mount point is mountable by the user.- Returns:
true
if the mount point is user mountable.
-