VFS: Add LibrarySys class helper

This commit is contained in:
Arkshine
2015-03-08 23:40:19 +01:00
parent a182ca62c8
commit d69ddc7234
4 changed files with 734 additions and 25 deletions

View File

@@ -43,30 +43,6 @@ ModuleCallReason g_ModuleCallReason;
extern const char* no_function; // stupid work around
bool DirExists(const char *dir)
{
#if defined WIN32 || defined _WIN32
DWORD attr = GetFileAttributes(dir);
if (attr == INVALID_FILE_ATTRIBUTES)
return false;
if (attr & FILE_ATTRIBUTE_DIRECTORY)
return true;
#else
struct stat s;
if (stat(dir, &s) != 0)
return false;
if (S_ISDIR(s.st_mode))
return true;
#endif
return false;
}
void report_error(int code, const char* fmt, ...)
{
va_list argptr;