string getAppPath(string app)
Returns file path to the application (searches among system directories).
void createPipe(in string pipepath, uint mode = octal!666)
The function creates named pipe.
Parameters
| pipepath | Name for pipe file. |
| mode | Specifies the FIFO's permission. |
See Also:
man 3 mkfifo
string getAppShareDir()
Helper function for getting the standard path to the share directory of the current program.
string getAppHelpDir()
Helper function for getting the standard path to the help directory of the current program.
string readAppHelpText(string app, string lang = "")
This function returns help text of the current program using standard paths for help file.
void mount(
string source,
string target,
string fs,
ulong flags = 0,
void* data = null
)
Attaches the filesystem specified by source.
Parameters
| source | Filesystem source. |
| target | Location for mounting. |
| fs | Filesystem type, supported values are listed in "/proc/filesystems". |
| flags | Additional mount flags. Zero, by default. |
| data | Special data for required filesystem. Null pointer, by default. |
See Also:
man 2 mount
uint getGroupIdByName(string groupName)
Returns group numeric identifier, given the known group name.
gid_t[] getGroups(gid_t uid = uid_t.max)
Returns all system group IDs (if UID isn't specified) or group IDs that the specified user is associated with.
void* createMapping(File f, size_t size, MapMode mode = MapMode.rdWr)
Creates a new mapping for the specified file.
Parameters
| f | related file object |
| size | size of allocatable memory in bytes |
| mode | access mode (read/write, by default) |
void* createAnonymousMapping(size_t size)
Allocates memory using anonymous mapping. New memory will contain zeros.
Parameters
| size | size of allocatable memory in bytes |
Returns
pointer to allocatable memory area.
void destroyMapping(T)(T* p, size_t size)
Releases the mapping.
Parameters
| p | pointer to mapping |
| size | size used during the creation of the mapping |
void addSignalHandler(S, H)(S sig, H handler)
if ((is(S == Signal) || is(S : int)) && (is(H == c_sigfn_t) || is(H == d_sigfn_t) || is(H == d_sigfn_int_t)))
The function sets the handler for the signal number.
Parameters
| sig | signal number of Signal or int-like type |
| handler | signal handler of c_sigfn_t or d_sigfn_t type |
string getSignalDescription(Signal signal)
Gets UNIX signal string view.
Parameters
| signal | explored signal value |
Returns
string interpretation of the signal
string[] findMountPoints(string blockDevicePath)
Gets a list of mount points related to the specified block device.
string[] findDevicesByMountPoint(string mountPoint)
Gets a list of devices related to the specified mount point.
Enums
| MapMode | |
| Signal |
Aliases
| c_sigfn_t | |
| d_sigfn_t | |
| d_sigfn_int_t |
Functions
Classes
| LoopDevControl | |
| SysException |
The module provides mostly wrappers for low-level system functions, including functions for mounting/unmounting file systems, functions for working with loop devices, functions for getting information about users and groups, functions for mappings, for working with signals, etc.