Sdk sys api documentation

Sys allocation functions

Namespace: dmSys
Include: #include <dmsdk/dlib/sys.h>
ENUMS
Result result code
STRUCTS
struct StatInfo Status info for a file or directory
FUNCTIONS
bool Exists(const char* path) Checks if a path exists
 Rename(const char* dst_path, const char* src_path) Move a file or directory
dmSys::Result Unlink(const char* path) Remove file

Functions

Exists

bool Exists(const char* path)

Checks if a path exists

PARAMETERS

const char* path path to directory to create

RETURNS

bool true on success

Rename

 Rename(const char* dst_path, const char* src_path)

Move a file or directory

PARAMETERS

const char* dst_path the destination path. The file which contents is to be overwritten.
const char* src_path the source path. The contents will be written to the destination path and the file unlinked if successful.

RETURNS

on success

Unlink

dmSys::Result Unlink(const char* path)

Remove file

PARAMETERS

const char* path path to file to remove

RETURNS

dmSys::Result RESULT_OK on success

Structs

StatInfo

TYPE

struct StatInfo

Status info for a file or directory

MEMBERS

uint32_t m_Size the file size (if it's a file)
uint32_t m_Mode the flags of the path
uint32_t m_AccessTime the last access time
uint32_t m_ModifiedTime the last modified time


Enums

Result

Result code. Similar to standard posix result codes

dmSys::RESULT_OK
 0
dmSys::RESULT_PERM -1
dmSys::RESULT_NOENT -2
dmSys::RESULT_SRCH -3
dmSys::RESULT_INTR -4
dmSys::RESULT_IO
-5
dmSys::RESULT_NXIO -6
dmSys::RESULT_2BIG -7
dmSys::RESULT_NOEXEC -8
dmSys::RESULT_BADF -9
dmSys::RESULT_CHILD -10
dmSys::RESULT_DEADLK -11
dmSys::RESULT_NOMEM -12
dmSys::RESULT_ACCES -13
dmSys::RESULT_FAULT -14
dmSys::RESULT_BUSY -15
dmSys::RESULT_EXIST -16
dmSys::RESULT_XDEV -17
dmSys::RESULT_NODEV -18
dmSys::RESULT_NOTDIR -19
dmSys::RESULT_ISDIR -20
dmSys::RESULT_INVAL -21
dmSys::RESULT_NFILE -22
dmSys::RESULT_MFILE -23
dmSys::RESULT_NOTTY -24
dmSys::RESULT_TXTBSY -25
dmSys::RESULT_FBIG -26
dmSys::RESULT_NOSPC -27
dmSys::RESULT_SPIPE -28
dmSys::RESULT_ROFS -29
dmSys::RESULT_MLINK -30
dmSys::RESULT_PIPE -31
dmSys::RESULT_NOTEMPTY -32
dmSys::RESULT_UNKNOWN -1000