-
Notifications
You must be signed in to change notification settings - Fork 0
CrossLib namespace
#include "crosslib.h"
Since version 0.2 "Firmament", iash provides a small library that covers a few platform-independent actions. Functions will be added as development continues. If you want to add a function, either make a pull request or add an enhancement in the issue tracker.
Currently, CrossLib supports Unix-based systems (e.g. Linux, OSX) and Windows. If you want to add a system, make a pull request.
If you are compiling on Unix-based systems, you need to link the tinfo
library. This might change between systems (it could be terminfo
, curses
, or ncurses
). If you use CMake, then this is already done for you.
Version: v0.2 "Firmament"
Introduced in v0.2 "Firmament"
void CrossLib::clearScreen ()
Clears the terminal screen.
Introduced in v0.2 "Firmament"
int mkdir (const char* pathname)
Creates a directory at pathname
. Note that some systems have a limit to the number of directories that can be made in one call.
-
pathname
: The path of the new directory.
0 if the directory was successfully created, -1 otherwise. If directory creation fails, errno is set accordingly.
Introduced in v0.2 "Firmament"
bool isdir (const char* path)
Checks to see if path
is a directory.
-
path
: The path of the directory to check.
Whether the path is a directory.
Introduced in v0.2 "Firmament"
bool isfile (const char* path)
Checks to see if path
is a file.
-
path
: The path of the file to check.
Whether the path is a file.
Introduced in v0.2 "Firmament"
std::string getConfigDir ()
Returns an absolute path to the location where application data is stored.
An absolute path to the application configuration directory.
iash wiki -- Go home
-
Current version
- API reference
- Runtime documentation
-
Older versions
- API reference
- Runtime documentation
- Posting to the Issue Tracker