summaryrefslogtreecommitdiff
path: root/osdep
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-03-17 18:19:51 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-03-17 18:19:51 -0700
commit4f3f471b4c7726b9ac66304788613c3c12e09d12 (patch)
treefa5723c3314452d2da5f0efc23c0de593ec469e7 /osdep
parente10325e133beb01a2e9d82687eb33fd72f1ac3ab (diff)
downloadinfinitytier-4f3f471b4c7726b9ac66304788613c3c12e09d12.tar.gz
infinitytier-4f3f471b4c7726b9ac66304788613c3c12e09d12.zip
GitHub issue #460
Diffstat (limited to 'osdep')
-rw-r--r--osdep/OSUtils.cpp37
-rw-r--r--osdep/OSUtils.hpp8
2 files changed, 0 insertions, 45 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;
diff --git a/osdep/OSUtils.hpp b/osdep/OSUtils.hpp
index adf1488e..2e007ef2 100644
--- a/osdep/OSUtils.hpp
+++ b/osdep/OSUtils.hpp
@@ -112,14 +112,6 @@ public:
static std::vector<std::string> listDirectory(const char *path);
/**
- * List all contents in a directory
- *
- * @param path Path to list
- * @return Names of things and types, currently just 'f' and 'd'
- */
- static std::map<std::string,char> listDirectoryFull(const char *path);
-
- /**
* Clean a directory of files whose last modified time is older than this
*
* This ignores directories, symbolic links, and other special files.