Mstdlib-1.24.0
|
Functions | |
M_fs_error_t | M_fs_symlink (const char *target, const char *link_name) |
M_fs_error_t | M_fs_move (const char *path_old, const char *path_new, M_uint32 mode, M_fs_progress_cb_t cb, M_uint32 progress_flags) |
M_fs_error_t | M_fs_copy (const char *path_old, const char *path_new, M_uint32 mode, M_fs_progress_cb_t cb, M_uint32 progress_flags) |
M_fs_error_t | M_fs_delete (const char *path, M_bool remove_children, M_fs_progress_cb_t cb, M_uint32 progress_flags) |
M_fs_error_t M_fs_symlink | ( | const char * | target, |
const char * | link_name | ||
) |
Create a soft link.
[in] | target | The target to link. |
[in] | link_name | The link to create. |
M_fs_error_t M_fs_move | ( | const char * | path_old, |
const char * | path_new, | ||
M_uint32 | mode, | ||
M_fs_progress_cb_t | cb, | ||
M_uint32 | progress_flags | ||
) |
Move a file or directory from one location to another.
If moving a file to an existing directory the file will be copied into the directory with the same name.
[in] | path_old | The file to move. |
[in] | path_new | The location the file should be moved to. |
[in] | mode | M_fs_file_mode_t mode. Only supports OVERWRITE. If overwrite is set the move will overwrite the file if it exists. Without this set the move operation will fail if the file exists. |
[in] | cb | Progress callback that should be called. |
[in] | progress_flags | M_fs_progress_flags_t flags to control what data should be set in the progress callback. |
M_fs_error_t M_fs_copy | ( | const char * | path_old, |
const char * | path_new, | ||
M_uint32 | mode, | ||
M_fs_progress_cb_t | cb, | ||
M_uint32 | progress_flags | ||
) |
Copy a file or directory to a new location.
If copying a file to an existing directory the file will be copied into the directory with the same name.
[in] | path_old | The file to move. |
[in] | path_new | The location the file should be copied to. |
[in] | mode | M_fs_file_mode_t mode. Only supports OVERWRITE. If overwrite is set the move will overwrite the file if it exists. Without this set the move operation will fail if the file exists. |
[in] | cb | Progress callback that should be called. |
[in] | progress_flags | M_fs_progress_flags_t flags to control what data should be set in the progress callback. |
M_fs_error_t M_fs_delete | ( | const char * | path, |
M_bool | remove_children, | ||
M_fs_progress_cb_t | cb, | ||
M_uint32 | progress_flags | ||
) |
Delete a file or directory.
[in] | path | The file to delete. |
[in] | remove_children | Only applies to directories. If M_TRUE all contents of the directory will be removed in addition to the directory itself. If M_FALSE and the directory is not empty an error will be returned. |
[in] | cb | Progress callback function. Most useful when deleting a directory with children and remove_children is M_TRUE. Will be called after a delete action is completed (each child is deleted and the passed path itself is deleted). |
[in] | progress_flags | M_fs_progress_flags_t flags to control what data should be set in the progress callback. |