libdragon
|
DragonFS. More...
Go to the source code of this file.
Defines | |
#define | DFS_DEFAULT_LOCATION 0xB0101000 |
Default filesystem location. | |
#define | MAX_OPEN_FILES 4 |
Maximum open files in DragonFS. | |
#define | MAX_FILENAME_LEN 243 |
Maximum filename length. | |
#define | MAX_DIRECTORY_DEPTH 100 |
Maximum depth of directories supported. | |
#define | FILETYPE(x) ((x) & 3) |
Macro to extract the file type from a DragonFS file flag. | |
DragonFS Return values | |
#define | DFS_ESUCCESS 0 |
Success. | |
#define | DFS_EBADINPUT -1 |
Input parameters invalid. | |
#define | DFS_ENOFILE -2 |
File does not exist. | |
#define | DFS_EBADFS -3 |
Bad filesystem. | |
#define | DFS_ENOMEM -4 |
No memory for operation. | |
#define | DFS_EBADHANDLE -5 |
Invalid file handle. | |
DragonFS file type flags | |
#define | FLAGS_FILE 0x0 |
This is a file entry. | |
#define | FLAGS_DIR 0x1 |
This is a directory entry. | |
#define | FLAGS_EOF 0x2 |
This is the end of a directory list. | |
Functions | |
int | dfs_init (uint32_t base_fs_loc) |
Initialize the filesystem. | |
int | dfs_chdir (const char *const path) |
Change directories to the specified path. | |
int | dfs_dir_findfirst (const char *const path, char *buf) |
Find the first file or directory in a directory listing. | |
int | dfs_dir_findnext (char *buf) |
Find the next file or directory in a directory listing. | |
int | dfs_open (const char *const path) |
Open a file given a path. | |
int | dfs_read (void *const buf, int size, int count, uint32_t handle) |
Read data from a file. | |
int | dfs_seek (uint32_t handle, int offset, int origin) |
Seek to an offset in the file. | |
int | dfs_tell (uint32_t handle) |
Return the current offset into a file. | |
int | dfs_close (uint32_t handle) |
Close an already open file handle. | |
int | dfs_eof (uint32_t handle) |
Return whether the end of file has been reached. | |
int | dfs_size (uint32_t handle) |
Return the file size of an open file. |
DragonFS.