int c_system(string cmd)

Common function for calling external programs.

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

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.

string getNameByUID(uint uid)

The function returns user name by user ID.

string getNameByGID(uint gid)

The function returns group name by group ID.

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

void umount(string target)

Removes the attachment of the filesystem mounted on target.

Parameters

target

Target directory with mounted filesystem.

See also: man 2 umount

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.

extern (C) int getpagesize() pure nothrow @nogc

Gets memory page size. See: man getpagesize

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 setupSignalHandler(int signum, c_sigfn_t handler)

The function sets the handler for the signal number.

void setupSignalHandler(int signo, void function(int) handler)

The function sets the handler for the signal number.

void setupSignalHandler(Signal signal, void function(Signal) handler)

The function sets the handler for the signal number.

string getSignalDescription(Signal signal)

Gets UNIX signal string view.

Parameters

signal

explored signal value

Returns

string interpretation of the signal

Public imports