This group contains the definition of a GWEN_FSLOCK.
More...
Typedefs |
typedef struct GWEN_FSLOCK | GWEN_FSLOCK |
Enumerations |
enum | GWEN_FSLOCK_RESULT {
GWEN_FSLock_ResultOk = 0,
GWEN_FSLock_ResultError,
GWEN_FSLock_ResultTimeout,
GWEN_FSLock_ResultBusy,
GWEN_FSLock_ResultNoLock,
GWEN_FSLock_ResultUserAbort
} |
enum | GWEN_FSLOCK_TYPE { GWEN_FSLock_TypeUnknown = 0,
GWEN_FSLock_TypeFile,
GWEN_FSLock_TypeDir
} |
Functions |
GWENHYWFAR_API void | GWEN_FSLock_Attach (GWEN_FSLOCK *fl) |
GWENHYWFAR_API void | GWEN_FSLock_free (GWEN_FSLOCK *fl) |
GWENHYWFAR_API const char * | GWEN_FSLock_GetName (const GWEN_FSLOCK *fl) |
GWENHYWFAR_API GWEN_FSLOCK_RESULT | GWEN_FSLock_Lock (GWEN_FSLOCK *fl, int timeout, uint32_t gid) |
GWENHYWFAR_API GWEN_FSLOCK * | GWEN_FSLock_new (const char *fname, GWEN_FSLOCK_TYPE t) |
GWENHYWFAR_API GWEN_FSLOCK_RESULT | GWEN_FSLock_Unlock (GWEN_FSLOCK *fl) |
Detailed Description
This group contains the definition of a GWEN_FSLOCK.
The files in this group provide a very simple lock mechanism. When a file is to be locked a lockfile is created exclusively. If this lockfile can not be created exclusively (because it already exists) the file is assumed to be locked. This group can lock files and folders. For folders the lockfile name consists of the foldername plus "/.dir.lck", for files it is the filename plus ".lck". This only works if you have write-access to the folder or, if locking a file, to the folder containing the file to be locked.
Typedef Documentation
Enumeration Type Documentation
- Enumerator:
GWEN_FSLock_ResultOk |
|
GWEN_FSLock_ResultError |
|
GWEN_FSLock_ResultTimeout |
|
GWEN_FSLock_ResultBusy |
|
GWEN_FSLock_ResultNoLock |
|
GWEN_FSLock_ResultUserAbort |
|
Definition at line 71 of file fslock.h.
- Enumerator:
GWEN_FSLock_TypeUnknown |
|
GWEN_FSLock_TypeFile |
|
GWEN_FSLock_TypeDir |
|
Definition at line 64 of file fslock.h.
Function Documentation
GWENHYWFAR_API void GWEN_FSLock_Attach |
( |
GWEN_FSLOCK * |
fl | ) |
|
GWENHYWFAR_API void GWEN_FSLock_free |
( |
GWEN_FSLOCK * |
fl | ) |
|
GWENHYWFAR_API const char* GWEN_FSLock_GetName |
( |
const GWEN_FSLOCK * |
fl | ) |
|