OpenMediaVault  0.6 (Kralizec)
The open network attached storage solution
 All Classes Functions Variables Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
OMVMntEnt Class Reference
Inheritance diagram for OMVMntEnt:
OMVObject

Public Member Functions

 __construct ($device, $dir)
 
 getDevice ()
 
 getMountPoint ()
 
 mount ($options="")
 
 umount ($force=FALSE, $lazy=FALSE)
 
 mkDir ()
 
 unlinkDir ($force=TRUE)
 
 isMounted ()
 
 isMountPoint ()
 
- Public Member Functions inherited from OMVObject
 __construct ()
 
 getLastError ()
 

Static Public Member Functions

static getFilesystemByDir ($dir)
 
static getFilesystemByName ($name)
 

Additional Inherited Members

- Protected Member Functions inherited from OMVObject
 setLastError ($error)
 
 debug ()
 

Detailed Description

A class that implements a mount point.

Constructor & Destructor Documentation

OMVMntEnt::__construct (   $device,
  $dir 
)

Constructor

Parameters
deviceThe block special device or remote file system, e.g. /dev/sde1, /dev/disk/by-uuid/2218-DF1C or rootfs.
dirThe mount point for the file system, e.g. /media/2218-DF1C.

Member Function Documentation

OMVMntEnt::getDevice ( )

Get the device.

Returns
The device, otherwise FALSE.
static OMVMntEnt::getFilesystemByDir (   $dir)
static

Get the OMVFilesystem object for the given mount point.

Parameters
dirThe file system path prefix.
Returns
The class object or NULL on failure.
static OMVMntEnt::getFilesystemByName (   $name)
static

Get the OMVFilesystem object for the given mount point.

Parameters
nameThe name of mounted file system.
Returns
The class object or NULL on failure.
OMVMntEnt::getMountPoint ( )

Get the mount point.

Returns
The mount point of the filesystem or FALSE.
OMVMntEnt::isMounted ( )

Check if the given file system is mounted.

Returns
TRUE if the file system is mounted, otherwise FALSE.
OMVMntEnt::isMountPoint ( )

See if the directory is a mount point.

Returns
TRUE if the directory is a mount point, FALSE if not.
OMVMntEnt::mkDir ( )

Create the mount point of the file system.

Returns
TRUE if successful, otherwise FALSE.
OMVMntEnt::mount (   $options = "")

Mount the given file system.

Parameters
optionsAdditional mount options. Defaults to "".
Returns
TRUE if successful, otherwise FALSE.
OMVMntEnt::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
TRUE if successful, otherwise FALSE.
OMVMntEnt::unlinkDir (   $force = TRUE)

Unlink the mount point of the file system.

Parameters
forceSet to TRUE to ignore nonexistent files. Defaults to TRUE.
Returns
TRUE if successful, otherwise FALSE.

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