Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

41 lines
1.2 KiB

  1. /* this header file comes from libowfat, http://www.fefe.de/libowfat/ */
  2. #ifndef OPEN_H
  3. #define OPEN_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /* open filename for reading and return the file handle or -1 on error */
  8. int open_read(const char* filename);
  9. /* create filename for exclusive write only use (mode 0600) and return
  10. * the file handle or -1 on error */
  11. int open_excl(const char* filename);
  12. /* open filename for appending write only use (mode 0600)
  13. * and return the file handle or -1 on error.
  14. * All write operation will append after the last byte, regardless of
  15. * seeking or other processes also appending to the file. The file will
  16. * be created if it does not exist. */
  17. int open_append(const char* filename);
  18. /* open filename for writing (mode 0644). Create the file if it does
  19. * not exist, truncate it to zero length otherwise. Return the file
  20. * handle or -1 on error. */
  21. int open_trunc(const char* filename);
  22. /* open filename for writing. Create the file if it does not exist.
  23. * Return the file handle or -1 on error. */
  24. int open_write(const char* filename);
  25. /* open filename for reading and writing. Create file if not there.
  26. * Return file handle or -1 on error. */
  27. int open_rw(const char* filename);
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif