diff options
author | madmaxoft <github@xoft.cz> | 2013-11-22 20:11:24 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-11-22 20:11:24 +0100 |
commit | 63753c5e8405837931510b8da648dc75d4970fe1 (patch) | |
tree | 58e495519d269f4e6d7aff94294101a5911465cc /source/StringUtils.cpp | |
parent | APIDump: Fixed cRoot's furnace query API. (diff) | |
download | cuberite-63753c5e8405837931510b8da648dc75d4970fe1.tar cuberite-63753c5e8405837931510b8da648dc75d4970fe1.tar.gz cuberite-63753c5e8405837931510b8da648dc75d4970fe1.tar.bz2 cuberite-63753c5e8405837931510b8da648dc75d4970fe1.tar.lz cuberite-63753c5e8405837931510b8da648dc75d4970fe1.tar.xz cuberite-63753c5e8405837931510b8da648dc75d4970fe1.tar.zst cuberite-63753c5e8405837931510b8da648dc75d4970fe1.zip |
Diffstat (limited to 'source/StringUtils.cpp')
-rw-r--r-- | source/StringUtils.cpp | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/source/StringUtils.cpp b/source/StringUtils.cpp index d52b1323f..f7aeeed26 100644 --- a/source/StringUtils.cpp +++ b/source/StringUtils.cpp @@ -270,55 +270,6 @@ void ReplaceString(AString & iHayStack, const AString & iNeedle, const AString & -AStringList GetDirectoryContents(const char * a_Directory) -{ - AStringList AllFiles; - - #ifdef _WIN32 - - AString FileFilter = AString(a_Directory) + "*.*"; - HANDLE hFind; - WIN32_FIND_DATA FindFileData; - - if ((hFind = FindFirstFile(FileFilter.c_str(), &FindFileData)) != INVALID_HANDLE_VALUE) - { - do - { - AllFiles.push_back(FindFileData.cFileName); - } while (FindNextFile(hFind, &FindFileData)); - FindClose(hFind); - } - - #else // _WIN32 - - DIR * dp; - struct dirent *dirp; - if (*a_Directory == 0) - { - a_Directory = "."; - } - if ((dp = opendir(a_Directory)) == NULL) - { - LOGERROR("Error (%i) opening directory \"%s\"\n", errno, a_Directory ); - } - else - { - while ((dirp = readdir(dp)) != NULL) - { - AllFiles.push_back(dirp->d_name); - } - closedir(dp); - } - - #endif // else _WIN32 - - return AllFiles; -} - - - - - // Converts a stream of BE shorts into UTF-8 string; returns a ref to a_UTF8 AString & RawBEToUTF8(short * a_RawData, int a_NumShorts, AString & a_UTF8) { |