OpenMediaVault  3.0 (Erasmus)
The open network attached storage solution
Public Member Functions | List of all members
OMV\System\MountPoint Class Reference

Public Member Functions

 __construct ($device=NULL, $dir=NULL)
 
 getDevice ()
 
 setDevice ($device)
 
 hasDevice ()
 
 assertDevice ()
 
 getDir ()
 
 setDir ($dir)
 
 hasDir ()
 
 assertDir ()
 
 mount ($options="")
 
 umount ($force=FALSE, $lazy=FALSE)
 
 mkDir ($mode="0700")
 
 unlinkDir ($force=TRUE)
 
 isMounted ()
 
 isMountPoint ()
 

Detailed Description

A class that implements a mount point.

Constructor & Destructor Documentation

OMV\System\MountPoint::__construct (   $device = NULL,
  $dir = NULL 
)

Constructor

Parameters
deviceThe name of the mounted file system, e.g.
/dev/sde1
  • /dev/disk/by-uuid/2218-DF1C
  • rootfs
  • efd877d8-3f79-11e6-84f9-0002b3a176b4
  • cc9097b9-8859-4455-ae82-a5dbf03d542a:1537599b-...-42678814a582
dirThe file system path prefix, e.g. /media/2218-DF1C.

Member Function Documentation

OMV\System\MountPoint::getDevice ( )

Get the name of the mounted file system, e.g.

/dev/sde1

  • /dev/disk/by-uuid/2218-DF1C
  • rootfs
  • efd877d8-3f79-11e6-84f9-0002b3a176b4
  • cc9097b9-8859-4455-ae82-a5dbf03d542a:1537599b-...-8202-42678814a582 .
    Returns
    The name of the mounted file system.
OMV\System\MountPoint::getDir ( )

Get the file system path prefix, e.g. /mnt/xyz.

Returns
The file system path prefix.
OMV\System\MountPoint::isMounted ( )

Check if the given file system is mounted.

Returns
TRUE if the file system is mounted, otherwise FALSE.
OMV\System\MountPoint::isMountPoint ( )

See if the directory is a mount point.

Returns
TRUE if the directory is a mount point, FALSE if not.
OMV\System\MountPoint::mkDir (   $mode = "0700")

Create the mount point of the file system.

Parameters
modeSet the file mode (as in chmod), e.g. '0755'. Defaults to '0700'.
Returns
None.
Exceptions
OMV\System\MountPoint::mount (   $options = "")

Mount the given file system.

Parameters
optionsAdditional mount options. Defaults to "".
Returns
None.
Exceptions
OMV\System\MountPoint::setDevice (   $device)

Set the name of the mounted file system.

Returns
None.
OMV\System\MountPoint::setDir (   $dir)

Set the file system path prefix, e.g. /mnt/xyz.

Returns
None.
OMV\System\MountPoint::umount (   $force = FALSE,
  $lazy = FALSE 
)

Unmount the given file system.

Parameters
forceSet to TRUE to force unmount. Defaults to FALSE.
lazySet to TRUE to lazy unmount. Defaults to FALSE.
Returns
None.
Exceptions
OMV\System\MountPoint::unlinkDir (   $force = TRUE)

Unlink the mount point of the file system.

Parameters
forceSet to TRUE to ignore nonexistent files. Defaults to TRUE.
Returns
None.
Exceptions

The documentation for this class was generated from the following file: