2012-02-27 16:05:10 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _FILEOPS
|
|
|
|
#define _FILEOPS
|
|
|
|
|
2013-07-07 01:50:26 +00:00
|
|
|
#include <dirent.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include "memory/mem2.hpp"
|
|
|
|
|
2012-02-27 16:05:10 +00:00
|
|
|
typedef void (*progress_callback_t)(int status,int total,void *user_data);
|
|
|
|
|
2018-05-08 13:49:43 +00:00
|
|
|
bool fsop_GetFileSizeBytes(const char *path, u32 *filesize);
|
2012-08-26 15:20:51 +00:00
|
|
|
u64 fsop_GetFolderBytes(const char *source);
|
|
|
|
u32 fsop_GetFolderKb(const char *source);
|
2012-11-01 16:39:42 +00:00
|
|
|
u32 fsop_GetFreeSpaceKb(const char *path);
|
2012-11-18 13:40:26 +00:00
|
|
|
bool fsop_CopyFile(const char *source, const char *target, progress_callback_t spinner, void *spinner_data);
|
|
|
|
bool fsop_CopyFolder(const char *source, const char *target, progress_callback_t spinner, void *spinner_data);
|
2012-08-20 19:15:52 +00:00
|
|
|
void fsop_deleteFolder(const char *source);
|
2013-10-19 18:59:17 +00:00
|
|
|
bool fsop_FileExist(const char *fn);
|
|
|
|
u8 *fsop_ReadFile(const char *path, u32 *size);
|
|
|
|
void fsop_ReadFileLoc(const char *path, const u32 size, void *loc);
|
|
|
|
bool fsop_WriteFile(const char *path, const void *mem, const u32 size);
|
|
|
|
void fsop_deleteFile(const char *source);
|
|
|
|
bool fsop_FolderExist(const char *path);
|
2016-12-01 00:05:39 +00:00
|
|
|
bool fsop_MakeFolder(const char *fullpath);
|
2012-02-27 16:05:10 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|