29 #if FNET_CFG_FS || defined(__DOXYGEN__) 154 #define FNET_FS_SPLITTER '/' 160 #define FNET_FS_EOF (-1) 205 #if defined(__cplusplus) 658 #if defined(__cplusplus) fnet_int32_t fnet_fs_ftell(fnet_fs_file_t file)
Gets the current position in a file.
fnet_fs_file_t fnet_fs_fopen(const fnet_char_t *filename, const fnet_char_t *mode)
Opens a file descriptor.
void fnet_fs_rewind(fnet_fs_file_t file)
Resets a file position.
void fnet_fs_release(void)
Releases the FNET File System Interface.
fnet_uint32_t d_ino
Entry serial number.
fnet_return_t fnet_fs_unmount(const fnet_char_t *mount_name)
Unmounts a file system.
fnet_return_t fnet_fs_closedir(fnet_fs_dir_t dir)
Closes a directory descriptor.
void * fnet_fs_dir_t
Directory descriptor. This is the abstract key for accessing a directory.
fnet_return_t
General return codes, used by most of API functions.
fnet_return_t fnet_fs_mount(fnet_char_t *fs_name, const fnet_char_t *mount_name, const void *arg)
Mounts a file system.
unsigned long fnet_size_t
Unsigned integer type representing the size in bytes.
void fnet_fs_rewinddir(fnet_fs_dir_t dir)
Resets a directory position.
fnet_return_t fnet_fs_fseek(fnet_fs_file_t file, fnet_int32_t offset, fnet_fs_seek_origin_t origin)
Changes the file-position indicator for the specified file.
Origin is the current position.
fnet_fs_d_type_t d_type
Type of the entry defined by the fnet_fs_d_type_t.
fnet_return_t fnet_fs_readdir(fnet_fs_dir_t dir, fnet_fs_dirent_t *dirent)
Reads a directory entry.
const fnet_char_t * d_name
Name of the entry (null-terminated string).
fnet_return_t fnet_fs_init(void)
Initializes the FNET File System Interface.
fnet_return_t fnet_fs_fclose(fnet_fs_file_t file)
Closes a file descriptor.
fnet_size_t d_size
Size of the file entry. If the entry is a directory this field is set to 0.
fnet_fs_d_type_t
Directory entry type.
fnet_return_t fnet_fs_finfo(fnet_fs_file_t file, fnet_fs_dirent_t *dirent)
Gets a file information.
fnet_bool_t fnet_fs_feof(fnet_fs_file_t file)
Checks the End-of-File indicator.
fnet_size_t fnet_fs_fread(void *buf, fnet_size_t size, fnet_fs_file_t file)
Reads data from a file.
fnet_fs_seek_origin_t
Origin position. Used by fnet_fs_fseek() function.
Origin is the start of the file.
This structure is used by the fnet_fs_finfo() and the fnet_fs_readdir() function to get information a...
fnet_int32_t fnet_fs_fgetc(fnet_fs_file_t file)
Gets a character from a file.
char fnet_char_t
Type representing the charecter.
fnet_fs_file_t fnet_fs_fopen_re(const fnet_char_t *filename, const fnet_char_t *mode, fnet_fs_dir_t dir)
Opens a file relatively in an opened directory.
Origin is the end of the file.
fnet_fs_dir_t fnet_fs_opendir(const fnet_char_t *dirname)
Opens a directory descriptor.
void * fnet_fs_file_t
File descriptor. This is the abstract key for accessing a file.