Add copy & move & more error checks.

This commit is contained in:
StackZ
2020-03-21 06:48:05 +01:00
parent 3fc7aa93a3
commit 44db400cbc
7 changed files with 210 additions and 11 deletions
+3
View File
@@ -24,4 +24,7 @@ bool returnIfExist(const std::string &path, const std::vector<std::string> &exte
std::string selectFilePath(std::string selectText, const std::vector<std::string> &extensionList, int selectionMode = 1);
void dirCopy(DirEntry* entry, int i, const char *destinationPath, const char *sourcePath);
int fcopy(const char *sourcePath, const char *destinationPath);
#endif //FILE_BROWSE_HPP
+7 -1
View File
@@ -52,6 +52,9 @@ enum ScriptState {
FAILED_DOWNLOAD,
SCRIPT_CANCELED,
SYNTAX_ERROR,
COPY_ERROR,
MOVE_ERROR,
DELETE_ERROR,
};
namespace ScriptHelper {
@@ -63,7 +66,7 @@ namespace ScriptHelper {
Result downloadRelease(std::string repo, std::string file, std::string output, bool includePrereleases, bool showVersions, std::string message);
Result downloadFile(std::string file, std::string output, std::string message);
void removeFile(std::string file, std::string message);
Result removeFile(std::string file, std::string message);
void installFile(std::string file, std::string message);
void extractFile(std::string file, std::string input, std::string output, std::string message);
Result createFile(const char * path);
@@ -75,6 +78,9 @@ namespace ScriptHelper {
void bootTitle(const std::string TitleID, bool isNAND, std::string message);
Result prompt(std::string message);
Result copyFile(std::string source, std::string destination, std::string message);
Result renameFile(std::string oldName, std::string newName, std::string message);
}
#endif