summaryrefslogtreecommitdiff
path: root/osdep/OSUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/OSUtils.cpp')
-rw-r--r--osdep/OSUtils.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/osdep/OSUtils.cpp b/osdep/OSUtils.cpp
index 6b95258c..aac6bdd8 100644
--- a/osdep/OSUtils.cpp
+++ b/osdep/OSUtils.cpp
@@ -108,43 +108,6 @@ std::vector<std::string> OSUtils::listDirectory(const char *path)
return r;
}
-std::map<std::string,char> OSUtils::listDirectoryFull(const char *path)
-{
- std::map<std::string,char> r;
-
-#ifdef __WINDOWS__
- HANDLE hFind;
- WIN32_FIND_DATAA ffd;
- if ((hFind = FindFirstFileA((std::string(path) + "\\*").c_str(),&ffd)) != INVALID_HANDLE_VALUE) {
- do {
- if ((strcmp(ffd.cFileName,"."))&&(strcmp(ffd.cFileName,".."))) {
- r[ffd.cFileName] = ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0) ? 'd' : 'f';
- }
- } while (FindNextFileA(hFind,&ffd));
- FindClose(hFind);
- }
-#else
- struct dirent de;
- struct dirent *dptr;
- DIR *d = opendir(path);
- if (!d)
- return r;
- dptr = (struct dirent *)0;
- for(;;) {
- if (readdir_r(d,&de,&dptr))
- break;
- if (dptr) {
- if ((strcmp(dptr->d_name,"."))&&(strcmp(dptr->d_name,".."))) {
- r[dptr->d_name] = (dptr->d_type == DT_DIR) ? 'd' : 'f';
- }
- } else break;
- }
- closedir(d);
-#endif
-
- return r;
-}
-
long OSUtils::cleanDirectory(const char *path,const uint64_t olderThan)
{
long cleaned = 0;