N64FlashcartMenu
|
File system utility functions. More...
Go to the source code of this file.
Macros | |
#define | FS_SECTOR_SIZE (512) |
Functions | |
char * | strip_fs_prefix (char *path) |
Strips the file system prefix from the given path. | |
char * | file_basename (char *path) |
Gets the basename of the given path. | |
bool | file_exists (char *path) |
Checks if a file exists at the given path. | |
int64_t | file_get_size (char *path) |
Gets the size of the file at the given path. | |
bool | file_allocate (char *path, size_t size) |
Allocates a file of the specified size at the given path. | |
bool | file_fill (char *path, uint8_t value) |
Fills a file with the specified value. | |
bool | file_has_extensions (char *path, const char *extensions[]) |
Checks if a file has one of the specified extensions. | |
bool | directory_exists (char *path) |
Checks if a directory exists at the given path. | |
bool | directory_create (char *path) |
Creates a directory at the given path. | |
File system utility functions.
char * strip_fs_prefix | ( | char * | path | ) |
Strips the file system prefix from the given path.
This function removes the file system prefix from the provided path.
path | The path from which to strip the prefix. |
char * file_basename | ( | char * | path | ) |
Gets the basename of the given path.
This function returns the basename of the provided path.
path | The path from which to get the basename. |
bool file_exists | ( | char * | path | ) |
Checks if a file exists at the given path.
This function checks if a file exists at the specified path.
path | The path to the file. |
int64_t file_get_size | ( | char * | path | ) |
Gets the size of the file at the given path.
This function returns the size of the file at the specified path.
path | The path to the file. |
bool file_allocate | ( | char * | path, |
size_t | size ) |
Allocates a file of the specified size at the given path.
This function creates a file of the specified size at the provided path.
path | The path to the file. |
size | The size of the file to create. |
bool file_fill | ( | char * | path, |
uint8_t | value ) |
Fills a file with the specified value.
This function fills the file at the given path with the specified value.
path | The path to the file. |
value | The value to fill the file with. |
bool file_has_extensions | ( | char * | path, |
const char * | extensions[] ) |
Checks if a file has one of the specified extensions.
This function checks if the file at the given path has one of the specified extensions.
path | The path to the file. |
extensions | An array of extensions to check. |
bool directory_exists | ( | char * | path | ) |
Checks if a directory exists at the given path.
This function checks if a directory exists at the specified path.
path | The path to the directory. |
bool directory_create | ( | char * | path | ) |
Creates a directory at the given path.
This function creates a directory at the specified path.
path | The path to the directory. |