11#include "attributes.h"
13SENTINEL( 0 ) int _nfile_concatPaths(
char buf[ static 1 ],
int maxLength, const
char path[ static 1 ], ... );
23#define nfile_concatPaths( buf, maxLength, path, ... ) _nfile_concatPaths( buf, maxLength, path, ##__VA_ARGS__, NULL )
Provides macros to work with dynamic arrays.
int nfile_copyIfExists(const char *file1, const char *file2)
Copy a file, if it exists.
const char * nfile_configPath(void)
Gets Naev's config path (for user preferences such as conf.lua)
int nfile_writeFile(const char *data, size_t len, const char *path)
Tries to write a file.
char * nfile_readFile(size_t *filesize, const char *path)
Tries to read a file.
int nfile_dirMakeExist(const char *path)
Creates a directory if it doesn't exist.
int nfile_backupIfExists(const char *path)
Backup a file, if it exists.
const char * nfile_cachePath(void)
Gets Naev's cache path (for cached data such as generated textures)
int nfile_fileExists(const char *path)
Checks to see if a file exists.
int nfile_touch(const char *path)
Tries to create the file if it doesn't exist.
int nfile_isSeparator(uint32_t c)
Checks to see if a character is used to separate files in a path.
int nfile_dirExists(const char *path)
Checks to see if a directory exists.