More rFile cleanups and fixes.
Was using fileExists/dirExists before when really should have just been exists. File or Dir doesn't matter and would only create false negatives. Current working directory shouldn't really be used at all. This is just the folder the application is run from (not even where the .exe resides). Some of the infos required by vfsLocalDir such as executable may not be portable. Not sure of their intended function as they are never used.
This commit is contained in:
+18
-14
@@ -2,6 +2,24 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
struct FileInfo {
|
||||
std::string name;
|
||||
std::string fullName;
|
||||
bool exists;
|
||||
bool isDirectory;
|
||||
bool isWritable;
|
||||
uint64_t size;
|
||||
};
|
||||
|
||||
bool getFileInfo(const char *path, FileInfo *fileInfo);
|
||||
bool rIsDir(const std::string& filename);
|
||||
bool rRmdir(const std::string& dir);
|
||||
bool rMkdir(const std::string& dir);
|
||||
bool rMkpath(const std::string& path);
|
||||
bool rRename(const std::string &from, const std::string &to);
|
||||
bool rExists(const std::string &path);
|
||||
bool rRemoveFile(const std::string &path);
|
||||
|
||||
enum rSeekMode
|
||||
{
|
||||
rFromStart,
|
||||
@@ -41,20 +59,6 @@ public:
|
||||
void *handle;
|
||||
};
|
||||
|
||||
std::string rGetCwd();
|
||||
bool rRmdir(const std::string& dir);
|
||||
bool rMkdir(const std::string& dir);
|
||||
bool rMkpath(const std::string& path);
|
||||
bool rRename(const std::string &from, const std::string &to);
|
||||
bool rExists(const std::string &path);
|
||||
bool rDirExists(const std::string &path);
|
||||
bool rFileExists(const std::string &path);
|
||||
bool rRemoveFile(const std::string &path);
|
||||
|
||||
bool rIsWritable(const std::string& path);
|
||||
bool rIsReadable(const std::string& path);
|
||||
bool rIsExecutable(const std::string& path);
|
||||
|
||||
struct rDir
|
||||
{
|
||||
rDir();
|
||||
|
||||
Reference in New Issue
Block a user