Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/sys/System.h>
Public Types | |
typedef int | access_t |
Static Public Member Functions | |
static Pair< SystemInStream *, SystemOutStream * > | pipe (void) throw (SystemException) |
static unsigned int | random (unsigned int top) |
static io::OutStream * | createFile (const Path &path) throw (SystemException) |
static io::OutStream * | appendFile (const Path &path) throw (SystemException) |
static io::InStream * | readFile (const Path &path) throw (SystemException) |
static io::RandomAccessStream * | openRandomFile (const Path &path, access_t access=READ) throw (SystemException) |
static io::RandomAccessStream * | createRandomFile (const Path &path, access_t access=READ) throw (SystemException) |
static Path | getUnitPath (void *address) |
static cstring | getEnv (cstring key) |
static bool | hasEnv (cstring key) |
static string | getLibraryFileName (const string &name) |
static string | getPluginFileName (const string &name) |
Static Public Attributes | |
static const int | READ = 1 |
static const int | WRITE = 2 |
static const int | READ_WRITE = READ | WRITE |
static cstring | library_prefix = "lib" |
static cstring | library_suffix |
static cstring | exec_suffix |
Non-instatiable object giving access to system facilities.
typedef int elm::sys::System::access_t |
|
static |
Open a file for appending write. The opened file must be fried by the caller (causing the closure).
path | Path of the file to open. |
SystemException | Thrown if there is an error. |
|
static |
Create a new file and open it to write. The created file must be fried by the caller (causing the file closure).
path | Path of the file to open. |
SystemException | Thrown if there is an error. |
|
static |
Create a random access stream from a file, removing it if it already exists.
path | Path of the file to open. |
access | Type of access (one of READ, WRITE, READ_WRITE). |
IOException | Thrown if there is an error. |
References elm::_.
Referenced by elm::io::RandomAccessStream::createFile().
|
static |
Get the path of the object item (library, program) containing the symbol whose address is given.
address | Address of the looked symbol. |
References elm::sys::Path::canonical(), and elm::mod().
|
static |
|
static |
Open a random access stream from a file.
path | Path of the file to open. |
access | Type of access (one of READ, WRITE, READ_WRITE). |
IOException | Thrown if there is an error. |
References elm::_.
Referenced by elm::io::RandomAccessStream::openFile().
|
static |
Create a pipe with input / output end streams.
System | exception. |
References elm::win::getErrorMessage(), and elm::pair().
|
static |
Generate an integer random number in interval [0, top[.
top | Maximum exclusive value. |
|
static |
Open a file for reading. The opened file must be fried by the caller (causing the closure).
path | Path of the file to open. |
SystemException | Thrown if there is an error. |
Referenced by elm::ini::File::load(), and elm::sys::Plugger::plugFile().
|
static |
|
static |
Prefix of the dynamic libraries of the current OS.
|
static |
|
static |
|
static |