|
| const char * | nfile_configPath (void) |
| | Gets Naev's config path (for user preferences such as conf.lua)
|
| const char * | nfile_cachePath (void) |
| | Gets Naev's cache path (for cached data such as generated textures)
|
| | if (strncpy(path==NULL) |
| | for (;p >=opath;p--) |
| | for (;p[0] !='\0';p++) |
| | if (!nfile_dirExists(opath)) |
| int | nfile_dirMakeExist (const char *path) |
| | Creates a directory if it doesn't exist.
|
| int | nfile_dirExists (const char *path) |
| | Checks to see if a directory exists.
|
| int | nfile_fileExists (const char *path) |
| | Checks to see if a file exists.
|
| int | nfile_backupIfExists (const char *path) |
| | Backup a file, if it exists.
|
| int | nfile_copyIfExists (const char *file1, const char *file2) |
| | Copy a file, if it exists.
|
| char * | nfile_readFile (size_t *filesize, const char *path) |
| | Tries to read a file.
|
| int | nfile_touch (const char *path) |
| | Tries to create the file if it doesn't exist.
|
| int | nfile_writeFile (const char *data, size_t len, const char *path) |
| | Tries to write a file.
|
| int | nfile_isSeparator (uint32_t c) |
| | Checks to see if a character is used to separate files in a path.
|
| int | _nfile_concatPaths (char buf[static 1], int maxLength, const char path[static 1],...) |
| int | nfile_simplifyPath (char path[static 1]) |
| | Simplifies the path removing things like ".." or consecutive "/".
|
| void | SDL_ShowOpenFileDialog (SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const SDL_DialogFileFilter *filters, const char *default_location, SDL_bool allow_many) |
| void | SDL_ShowOpenFolderDialog (SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const char *default_location, SDL_bool allow_many) |
| void | SDL_ShowSaveFileDialog (SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const SDL_DialogFileFilter *filters, const char *default_location) |
Handles read/write abstractions to the users directory.
- Todo
- Add support for Windows and macOS.
Definition in file nfile.c.