le_fileLock.h
Go to the documentation of this file.
1 
155  //--------------------------------------------------------------------------------------------------
163 #ifndef LEGATO_FLOCK_INCLUDE_GUARD
164 #define LEGATO_FLOCK_INCLUDE_GUARD
165 
166 
167 //--------------------------------------------------------------------------------------------------
174 //--------------------------------------------------------------------------------------------------
175 typedef enum
176 {
183 }
186 
187 
188 //--------------------------------------------------------------------------------------------------
192 //--------------------------------------------------------------------------------------------------
193 typedef enum
194 {
198 }
200 
201 
202 //--------------------------------------------------------------------------------------------------
218 //--------------------------------------------------------------------------------------------------
219 int le_flock_Open
220 (
221  const char* pathNamePtr,
222  le_flock_AccessMode_t accessMode
223 );
224 
225 
226 //--------------------------------------------------------------------------------------------------
253 //--------------------------------------------------------------------------------------------------
254 int le_flock_Create
255 (
256  const char* pathNamePtr,
257  le_flock_AccessMode_t accessMode,
258  le_flock_CreateMode_t createMode,
259  mode_t permissions
260 );
262 
263 
264 //--------------------------------------------------------------------------------------------------
281 //--------------------------------------------------------------------------------------------------
283 (
284  const char* pathNamePtr,
285  le_flock_AccessMode_t accessMode
286 );
287 
288 
289 //--------------------------------------------------------------------------------------------------
317 //--------------------------------------------------------------------------------------------------
319 (
320  const char* pathNamePtr,
321  le_flock_AccessMode_t accessMode,
322  le_flock_CreateMode_t createMode,
323  mode_t permissions
324 );
326 
327 
328 //--------------------------------------------------------------------------------------------------
332 //--------------------------------------------------------------------------------------------------
333 void le_flock_Close
334 (
335  int fd
336 );
337 
338 
339 //--------------------------------------------------------------------------------------------------
358 //--------------------------------------------------------------------------------------------------
360 (
361  const char* pathNamePtr,
362  le_flock_AccessMode_t accessMode,
363  le_result_t* resultPtr
364 );
366 
367 
368 //--------------------------------------------------------------------------------------------------
397 //--------------------------------------------------------------------------------------------------
399 (
400  const char* pathNamePtr,
401  le_flock_AccessMode_t accessMode,
402  le_flock_CreateMode_t createMode,
403  mode_t permissions,
404  le_result_t* resultPtr
406 );
408 
409 
410 //--------------------------------------------------------------------------------------------------
430 //--------------------------------------------------------------------------------------------------
432 (
433  const char* pathNamePtr,
434  le_flock_AccessMode_t accessMode,
435  le_result_t* resultPtr
436 );
437 
438 
439 //--------------------------------------------------------------------------------------------------
470 //--------------------------------------------------------------------------------------------------
472 (
473  const char* pathNamePtr,
474  le_flock_AccessMode_t accessMode,
475  le_flock_CreateMode_t createMode,
476  mode_t permissions,
477  le_result_t* resultPtr
479 );
480 
481 
482 //--------------------------------------------------------------------------------------------------
486 //--------------------------------------------------------------------------------------------------
488 (
489  FILE* fileStreamPtr
490 );
491 
492 
493 #endif //LEGATO_FLOCK_INCLUDE_GUARD
int le_flock_TryCreate(const char *pathNamePtr, le_flock_AccessMode_t accessMode, le_flock_CreateMode_t createMode, mode_t permissions)
Opens the file for reading.
Definition: le_fileLock.h:177
le_flock_CreateMode_t
Definition: le_fileLock.h:193
le_result_t
Definition: le_basics.h:35
Opens the file for reading and writing.
Definition: le_fileLock.h:181
Fails if the file already exists.
Definition: le_fileLock.h:197
int le_flock_Open(const char *pathNamePtr, le_flock_AccessMode_t accessMode)
void le_flock_Close(int fd)
FILE * le_flock_TryOpenStream(const char *pathNamePtr, le_flock_AccessMode_t accessMode, le_result_t *resultPtr)
Definition: le_fileLock.h:179
le_flock_AccessMode_t
Definition: le_fileLock.h:175
Opens the file for writing.
Definition: le_fileLock.h:178
Opens the file if it already exists.
Definition: le_fileLock.h:195
Replaces the file if it already exists.
Definition: le_fileLock.h:196
void le_flock_CloseStream(FILE *fileStreamPtr)
FILE * le_flock_CreateStream(const char *pathNamePtr, le_flock_AccessMode_t accessMode, le_flock_CreateMode_t createMode, mode_t permissions, le_result_t *resultPtr)
Definition: le_fileLock.h:182
FILE * le_flock_OpenStream(const char *pathNamePtr, le_flock_AccessMode_t accessMode, le_result_t *resultPtr)
int le_flock_TryOpen(const char *pathNamePtr, le_flock_AccessMode_t accessMode)
int le_flock_Create(const char *pathNamePtr, le_flock_AccessMode_t accessMode, le_flock_CreateMode_t createMode, mode_t permissions)
FILE * le_flock_TryCreateStream(const char *pathNamePtr, le_flock_AccessMode_t accessMode, le_flock_CreateMode_t createMode, mode_t permissions, le_result_t *resultPtr)