LAR Library
1.14
|
fs.h File Reference
File System abstraction. More...
#include <larlib/base.h>
Go to the source code of this file.
Typedefs | |
typedef struct fsFile_t | fsFile_t |
Opaque type of a file. | |
Enumerations | |
enum | fsOpenFlags_t { FS_OPEN_READ = 1, FS_OPEN_WRITE = 2, FS_OPEN_CREATE = 4, FS_OPEN_RESET = 8, FS_OPEN_APPEND = 16 } |
Flags for fsOpen(). More... | |
enum | fsSeekWhence_t { FS_WHENCE_SET, FS_WHENCE_END, FS_WHENCE_CUR } |
Posible seek positions, see fsSeek(). More... | |
Functions | |
int | fsSetFileNamePrefix (const char *prefix) |
Set the common file name prefix. More... | |
int | fsPushFileNamePrefix (const char *prefix) |
Push a new item on the file name prefix stack. More... | |
int | fsPopFileNamePrefix (void) |
Remove the top item on the file name prefix stack. More... | |
const char * | fsGetFileNamePrefix (void) |
Return the current prefix being used. More... | |
int | fsOpen (const char *name, int flags, fsFile_t **file) |
Open the selected file to input and/or output. More... | |
int | fsClose (fsFile_t *f) |
Close a file handle. More... | |
int | fsRead (fsFile_t *f, int n, void *p) |
Try to read a number of bytes from a file. More... | |
int | fsReadByte (fsFile_t *f) |
Try to read the next byte from the file. More... | |
int | fsReadUntil (fsFile_t *f, const uint8_t *delims, int ndelim, int n, void *p) |
Read bytes from the input file until either one of delims bytes is found, or n bytes have been read. More... | |
int | fsWrite (fsFile_t *f, int n, const void *p) |
Try to write a number of bytes to a file. More... | |
int | fsWriteByte (fsFile_t *f, int b) |
Try to write a byte to a file. More... | |
int | fsTell (fsFile_t *f) |
Return the current read/write position of a file. More... | |
int | fsSeek (fsFile_t *f, int whence, int offset) |
Set the read/write position for a file. More... | |
int | fsLength (fsFile_t *f) |
Return the length of an open file in bytes. More... | |
int | fsRemove (const char *name) |
Delete file name from the file system. More... | |
int | fsRename (const char *oldname, const char *newname) |
Rename the file oname to newname . More... | |
int | fsExist (const char *name) |
Check if file name exists. More... | |
Detailed Description
File System abstraction.
Generated on Mon Mar 27 2017 15:42:52 for LAR Library by 1.8.9.1