filepath.h File Reference
#include <time.h>
#include <pmplib/ucs2char.h>
Go to the source code of this file.
Defines | |
#define | FILEPATHAPI |
Typedefs | |
typedef int(*) | filepath_findfile_callback (void *instance, const ucs2char_t *found_path, const ucs2char_t *found_file) |
Prototype for the callback function for receiving found files. | |
Functions | |
FILEPATHAPI ucs2char_t * | filepath_addslash (ucs2char_t *path) |
Add a (back)slash character to the end of a string. | |
FILEPATHAPI ucs2char_t * | filepath_removeslash (ucs2char_t *path) |
Remove a (back)slash character from the end of a string. | |
FILEPATHAPI const ucs2char_t * | filepath_combinepath (ucs2char_t *dst, size_t size, const ucs2char_t *path, const ucs2char_t *file) |
Concatenate two strings into one well-formed path. | |
FILEPATHAPI void | filepath_strippath (ucs2char_t *path) |
Remove the path portion of a filepath name. | |
FILEPATHAPI const ucs2char_t * | filepath_skippath (const ucs2char_t *path) |
Skip the path portion in a filepath name. | |
FILEPATHAPI void | filepath_remove_filespec (ucs2char_t *path) |
Remove the file portion from a string. | |
FILEPATHAPI const ucs2char_t * | filepath_skiproot (const ucs2char_t *path, const ucs2char_t *root) |
Skip a portion in a filepath name. | |
FILEPATHAPI const ucs2char_t * | filepath_changeroot (const ucs2char_t *path, const ucs2char_t *root) |
Skip a portion in filepath name, assuming it as the root directory. | |
FILEPATHAPI const ucs2char_t * | filepath_skipadirectory (const ucs2char_t *path) |
Skip a directory name in filepath name. | |
FILEPATHAPI void | filepath_add_extension (ucs2char_t *path, const ucs2char_t *ext) |
Add a file extension to the end of a string. | |
FILEPATHAPI void | filepath_remove_extension (ucs2char_t *path) |
Remove a file extension from the end of a string. | |
FILEPATHAPI int | filepath_relative_to_absolute (ucs2char_t *absolute, const ucs2char_t *base, const ucs2char_t *relative) |
Convert a relative path to its corresponding absolute path. | |
FILEPATHAPI int | filepath_path_canonicalize (ucs2char_t *dst, const ucs2char_t *src) |
Canonicalize a path. | |
FILEPATHAPI int | filepath_encode (ucs2char_t *path) |
Replaces all path separators with a backslash ('\') separator. | |
FILEPATHAPI int | filepath_decode (ucs2char_t *path) |
Replaces '\'-slashes in a path name with the native path separator. | |
FILEPATHAPI int | find_file (const ucs2char_t *path, int recursive, filepath_findfile_callback callback, void *instance) |
Find files. | |
FILEPATHAPI int | filepath_file_exists (const ucs2char_t *path) |
Test the existence of a file. | |
FILEPATHAPI int | filepath_hasext (const ucs2char_t *filename, const ucs2char_t *ext) |
Test a file name has an extension. | |
FILEPATHAPI int | filepath_is_dir (const ucs2char_t *path) |
Test if a filepath name represents a directory. | |
FILEPATHAPI int | filepath_is_relative (const ucs2char_t *path) |
Test if a filepath name represents a relative path. | |
FILEPATHAPI int | filepath_is_same_root (const ucs2char_t *path1, const ucs2char_t *path2) |
Test if two path names has a common prefix of a directory. | |
FILEPATHAPI time_t | filepath_mtime (const ucs2char_t *filename) |
Obtain the last-modified time of a file. | |
FILEPATHAPI int | filepath_compare_lastupdate (const ucs2char_t *file1, const ucs2char_t *file2) |
Compares the modification times of two files. | |
FILEPATHAPI uint32_t | filepath_size (const ucs2char_t *filename) |
Obtain the size of a file. | |
FILEPATHAPI int | filepath_removefile (const ucs2char_t *file) |
Remove a file. | |
FILEPATHAPI int | filepath_copyfile (const ucs2char_t *src, const ucs2char_t *dst) |
Copy a file. |
Define Documentation
#define FILEPATHAPI |
Definition at line 33 of file filepath.h.