- addSignalHandler
void addSignalHandler(S sig, H handler)
The function sets the handler for the signal number.
- c_system
int c_system(string cmd)
Common function for calling external programs.
- createAnonymousMapping
void* createAnonymousMapping(size_t size)
Allocates memory using anonymous mapping.
New memory will contain zeros.
- createMapping
void* createMapping(File f, size_t size, MapMode mode)
Creates a new mapping for the specified file.
- createPipe
void createPipe(string pipepath, uint mode)
The function creates named pipe.
- destroyMapping
void destroyMapping(T* p, size_t size)
- freeAnonymousMapping
deprecated void freeAnonymousMapping(void* p, size_t size)
Undocumented in source. Be warned that the author may not have intended to support it.
- getAppHelpDir
string getAppHelpDir()
Helper function for getting the standard path to the help directory
of the current program.
- getAppPath
string getAppPath(string app)
Returns file path to the application (searches among system directories).
- getAppShareDir
string getAppShareDir()
Helper function for getting the standard path to the share directory
of the current program.
- getGroupIdByName
uint getGroupIdByName(string groupName)
Returns group numeric identifier, given the known group name.
- getGroups
gid_t[] getGroups(gid_t uid)
Returns all system group IDs (if UID isn't specified)
or group IDs that the specified user is associated with.
- getNameByGID
string getNameByGID(uint gid)
The function returns group name by group ID.
- getNameByUID
string getNameByUID(uint uid)
The function returns user name by user ID.
- getSignalDescription
string getSignalDescription(Signal signal)
Gets UNIX signal string view.
- getSignalDescription
string getSignalDescription(int signum)
Undocumented in source. Be warned that the author may not have intended to support it.
- getTimeString (from amalthea.time)
string getTimeString(timestamp_t t) via public
import amalthea.time : getTimeString;
Gets a time string by timestamp (only seconds from timestamp is used).
- getpagesize
int getpagesize()
Gets memory page size. See: man getpagesize
- mount
void mount(string source, string target, string fs, ulong flags, void* data)
Attaches the filesystem specified by source.
- readAppHelpText
string readAppHelpText(string app, string lang)
This function returns help text of the current program using
standard paths for help file.
- setupSignalHandler
deprecated void setupSignalHandler(int sig, c_sigfn_t handler)
Undocumented in source. Be warned that the author may not have intended to support it.
- setupSignalHandler
deprecated void setupSignalHandler(int sig, void function(int) handler)
Undocumented in source. Be warned that the author may not have intended to support it.
- setupSignalHandler
deprecated void setupSignalHandler(Signal sig, void function(Signal) handler)
Undocumented in source. Be warned that the author may not have intended to support it.
- umount
void umount(string target)
Removes the attachment of the filesystem mounted on target.
This file is part of the Amalthea library. Copyright (C) 2018-2024 Eugene 'Vindex' Stulin Distributed under the BSL 1.0 or (at your option) the GNU LGPL 3.0 or later.
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.