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.-
Field Summary
Fields inherited from class io.github.jwharm.javagi.base.ProxyInstance
address
-
Constructor Summary
ConstructorsConstructorDescriptionUnixMountPoint
(MemorySegment address) Create a UnixMountPoint proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionstatic UnixMountPoint
Gets aGioUnix.MountPoint
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 aGioUnix.MountPoint
for a given mount path.If
timeRead
is set, it will be filled with a Unix timestamp for checking if the mount points have changed since withGioUnix#mountPointsChangedSince
.If more mount points have the same mount path, the last matching mount point is returned.
- Parameters:
mountPath
- path for a possible Unix mount pointtimeRead
- return location for a timestamp- Returns:
- a
GioUnix.MountPoint
, orNULL
if no match is found - Throws:
UnsupportedPlatformException
- when run on a platform other than linux or macos- Since:
- 2.66
-
compare
Compares two Unix mount points.- Parameters:
mount2
- aGioUnix.MountPoint
- Returns:
1
,0
or-1
if this UnixMountPoint is greater than, equal to, or less thanmount2
, respectively
-
copy
Makes a copy of this UnixMountPoint.- Returns:
- a new
GioUnix.MountPoint
- Since:
- 2.54
-
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
- Since:
- 2.32
-
guessCanEject
public boolean guessCanEject()Guesses whether a Unix mount point can be ejected.- Returns:
- true if this UnixMountPoint is deemed to be ejectable; false otherwise
-
guessIcon
-
guessName
Guesses the name of a Unix mount point.The result is a translated string.
- Returns:
- a newly allocated translated string
-
guessSymbolicIcon
-
isLoopback
public boolean isLoopback()Checks if a Unix mount point is a loopback device.- Returns:
- true if the mount point is a loopback device; false otherwise
-
isReadonly
public boolean isReadonly()Checks if a Unix mount point is read only.- Returns:
- true if a mount point is read only; false otherwise
-
isUserMountable
public boolean isUserMountable()Checks if a Unix mount point is mountable by the user.- Returns:
- true if the mount point is user mountable; false otherwise
-