382 int fsRename(
const char *oldname,
const char *newname);
Open file for reading.
Definition: fs.h:76
int fsWriteByte(fsFile_t *f, int b)
Try to write a byte to a file.
Seek from the end of file.
Definition: fs.h:88
int fsRename(const char *oldname, const char *newname)
Rename the file oname to newname.
fsSeekWhence_t
Posible seek positions, see fsSeek().
Definition: fs.h:86
int fsWrite(fsFile_t *f, int n, const void *p)
Try to write a number of bytes to a file.
Move position to FS_WHENCE_END after open, forces FS_OPEN_WRITE.
Definition: fs.h:80
int fsPushFileNamePrefix(const char *prefix)
Push a new item on the file name prefix stack.
int fsExist(const char *name)
Check if file name exists.
int fsRead(fsFile_t *f, int n, void *p)
Try to read a number of bytes from a file.
Create file if not found.
Definition: fs.h:78
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...
int fsPopFileNamePrefix(void)
Remove the top item on the file name prefix stack.
Reset file if present.
Definition: fs.h:79
int fsSeek(fsFile_t *f, int whence, int offset)
Set the read/write position for a file.
Seek from the start of file.
Definition: fs.h:87
int fsClose(fsFile_t *f)
Close a file handle.
Open file for writing.
Definition: fs.h:77
struct fsFile_t fsFile_t
Opaque type of a file.
Definition: fs.h:65
int fsTell(fsFile_t *f)
Return the current read/write position of a file.
Larlib basic definitions.
int fsReadByte(fsFile_t *f)
Try to read the next byte from the file.
fsOpenFlags_t
Flags for fsOpen().
Definition: fs.h:75
int fsLength(fsFile_t *f)
Return the length of an open file in bytes.
int fsRemove(const char *name)
Delete file name from the file system.
const char * fsGetFileNamePrefix(void)
Return the current prefix being used.
int fsOpen(const char *name, int flags, fsFile_t **file)
Open the selected file to input and/or output.
unsigned char uint8_t
Unsigned 8-bit integer.
Definition: base.h:162
int fsSetFileNamePrefix(const char *prefix)
Set the common file name prefix.
Seek from the current position.
Definition: fs.h:89