#include <string.h>
#include <unistd.h>
#endif
-#ifdef _MSC_VER
- #include <direct.h>
-#endif
+//#ifdef _MSC_VER
+// #include <direct.h>
+//#endif
/*
#ifdef __WIN32__
{
char abs_path[MAX_ABS_PATH + 1];
abs_path[0] = '\0';
-#ifdef _MSC_VER
- if (!_fullpath(abs_path, rel_path.s(), MAX_ABS_PATH)) return "";
- return abs_path;
-#else
+//#ifdef _MSC_VER
+// if (!_fullpath(abs_path, rel_path.s(), MAX_ABS_PATH)) return "";
+// return abs_path;
+//#else
if (!realpath(rel_path.s(), abs_path)) return "";
return abs_path;
-#endif
+//#endif
}
astring directory::current()
{
astring to_return("."); // failure result.
-#ifdef _MSC_VER
- flexichar buffer[MAX_ABS_PATH + 1] = { '\0' };
- GetCurrentDirectory(MAX_ABS_PATH, buffer);
- to_return = from_unicode_temp(buffer);
-#else
+//#ifdef _MSC_VER
+// flexichar buffer[MAX_ABS_PATH + 1] = { '\0' };
+// GetCurrentDirectory(MAX_ABS_PATH, buffer);
+// to_return = from_unicode_temp(buffer);
+//#else
char buffer[MAX_ABS_PATH + 1] = { '\0' };
if (realpath(".", buffer)) to_return = buffer;
-#endif
+//#endif
return to_return;
}
_folders->reset();
astring cur_dir = ".";
astring par_dir = "..";
+/*
#ifdef _MSC_VER
// start reading the directory.
WIN32_FIND_DATA wfd;
} while (FindNextFile(search_handle, &wfd));
FindClose(search_handle);
#else
+*/
DIR *dir = opendir(_path->s());
//hmmm: could check errno to determine what caused the problem.
if (!dir) return false;
entry = readdir(dir);
}
closedir(dir);
-#endif
+//#endif
shell_sort(_files->access(), _files->length());
shell_sort(_folders->access(), _folders->length());