[FileSystem] DeleteFile returns true or false now
FileSystem::DeleteFile: function returns the boolean from Game::Remove(<path>);
This commit is contained in:
parent
86bfc41812
commit
49c2ccd700
@ -172,11 +172,11 @@ namespace Components
|
|||||||
return fileList;
|
return fileList;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileSystem::DeleteFile(const std::string& folder, const std::string& file)
|
bool FileSystem::DeleteFile(const std::string& folder, const std::string& file)
|
||||||
{
|
{
|
||||||
char path[MAX_PATH] = { 0 };
|
char path[MAX_PATH] = { 0 };
|
||||||
Game::FS_BuildPathToFile(Dvar::Var("fs_basepath").get<const char*>(), reinterpret_cast<char*>(0x63D0BB8), Utils::String::VA("%s/%s", folder.data(), file.data()), reinterpret_cast<char**>(&path));
|
Game::FS_BuildPathToFile(Dvar::Var("fs_basepath").get<const char*>(), reinterpret_cast<char*>(0x63D0BB8), Utils::String::VA("%s/%s", folder.data(), file.data()), reinterpret_cast<char**>(&path));
|
||||||
Game::FS_Remove(path);
|
return Game::FS_Remove(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
int FileSystem::ReadFile(const char* path, char** buffer)
|
int FileSystem::ReadFile(const char* path, char** buffer)
|
||||||
|
@ -90,7 +90,7 @@ namespace Components
|
|||||||
|
|
||||||
static std::vector<std::string> GetFileList(const std::string& path, const std::string& extension);
|
static std::vector<std::string> GetFileList(const std::string& path, const std::string& extension);
|
||||||
static std::vector<std::string> GetSysFileList(const std::string& path, const std::string& extension, bool folders = false);
|
static std::vector<std::string> GetSysFileList(const std::string& path, const std::string& extension, bool folders = false);
|
||||||
static void DeleteFile(const std::string& folder, const std::string& file);
|
static bool DeleteFile(const std::string& folder, const std::string& file);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static std::mutex Mutex;
|
static std::mutex Mutex;
|
||||||
|
Loading…
Reference in New Issue
Block a user