diff options
Diffstat (limited to 'src/3rdparty/smount/smount.h')
-rw-r--r-- | src/3rdparty/smount/smount.h | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/3rdparty/smount/smount.h b/src/3rdparty/smount/smount.h index 249e590..05ee88b 100644 --- a/src/3rdparty/smount/smount.h +++ b/src/3rdparty/smount/smount.h @@ -14,78 +14,78 @@ enum // sm status enum { - SM_SUCCESS = 0, - SM_INVALIDMOUNT = 1, // invalid mount directory. - SM_NOSUCHDIR = 2, // directory or file doesn't exsist. - SM_UNABLEOPEN = 3, // - SM_CANTWRITE = 4, + SMT_SUCCESS = 0, + SMT_INVALIDMOUNT = 1, // invalid mount directory. + SMT_NOSUCHDIR = 2, // directory or file doesn't exsist. + SMT_UNABLEOPEN = 3, // + SMT_CANTWRITE = 4, }; -typedef struct sm_Path +typedef struct smtPath { int type; char* path; - struct sm_Path* next; -}sm_Path; + struct smtPath* next; +}smtPath; /** * A shared context structrue. */ -typedef struct sm_Shared +typedef struct smtShared { // the root directory - sm_Path* mount; + smtPath* mount; -}sm_Shared; +}smtShared; -sm_Shared* sm_newshared(); +smtShared* smtnewshared(); -void sm_closeshared(sm_Shared* S); +void smtcloseshared(smtShared* S); /** * Get error string with given error code. */ -const char *sm_errstr(int err); +const char *smterrstr(int err); /** * Mount a sub file system. */ -int sm_mount(sm_Shared* S, const char *path); +int smtmount(smtShared* S, const char *path); /** * Free mount */ -void sm_unmount(sm_Shared* S); +void smtunmount(smtShared* S); -int sm_exists(sm_Shared* S, const char *path); +int smtexists(smtShared* S, const char *path); /** * Get size of a file. */ -int sm_size(sm_Shared* S, const char *path); +int smtsize(smtShared* S, const char *path); /** * Can only read files under root directory. */ -void *sm_read(sm_Shared* S, const char *path, unsigned int *size); +void *smtread(smtShared* S, const char *path, unsigned int *size); -int sm_isdir(sm_Shared* S, const char *path); +int smtisdir(smtShared* S, const char *path); -int sm_isreg(sm_Shared* S, const char *path); +int smtisreg(smtShared* S, const char *path); /** * List all folders and files inside current mount directory. */ -sm_Path *sm_list(sm_Shared*S, const char *path); +smtPath *smtlist(smtShared*S, const char *path); -void sm_freelist(sm_Path* S); +void smtfreelist(smtPath* S); -int sm_write(sm_Shared* S, const char *path, const void *data, int size); +int smtwrite(smtShared* S, const char *path, const void *data, int size); -void sm_delete(sm_Shared* S, const char *path); +void smtdelete(smtShared* S, const char *path); -int sm_mkdir(sm_Shared* S, const char *path); +int smtmkdir(smtShared* S, const char *path); -char* sm_fullpath(sm_Shared* S, const char* path); +char* smtfullpath(smtShared* S, const char* path); #endif
\ No newline at end of file |