diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-01-07 14:52:27 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-01-07 14:52:27 +0200 |
commit | d38ac3aae3340beffb44cdd78a8dfd52828ec503 (patch) | |
tree | 3dbc2da53a923c084cdab53393a683f44aa9ae75 /src | |
parent | c32bd982e3bda6e049ecad761f4ca87e897add42 (diff) | |
download | minetest-d38ac3aae3340beffb44cdd78a8dfd52828ec503.tar.gz minetest-d38ac3aae3340beffb44cdd78a8dfd52828ec503.tar.bz2 minetest-d38ac3aae3340beffb44cdd78a8dfd52828ec503.zip |
removed boost support from filesys.cpp; default to posix
Diffstat (limited to 'src')
-rw-r--r-- | src/filesys.cpp | 40 |
1 files changed, 3 insertions, 37 deletions
diff --git a/src/filesys.cpp b/src/filesys.cpp index b62d3239c..a2d3f9d14 100644 --- a/src/filesys.cpp +++ b/src/filesys.cpp @@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., namespace fs { -#ifdef _WIN32 +#ifdef _WIN32 // WINDOWS #define _WIN32_WINNT 0x0501 #include <Windows.h> @@ -130,9 +130,7 @@ bool PathExists(std::string path) return (GetFileAttributes(path.c_str()) != INVALID_FILE_ATTRIBUTES); } -#else - -#ifdef linux +#else // POSIX #include <sys/types.h> #include <dirent.h> @@ -186,39 +184,7 @@ bool PathExists(std::string path) return (stat(path.c_str(),&st) == 0); } -#else - -#include "boost/filesystem/operations.hpp" -namespace bfsys = boost::filesystem; - -std::vector<DirListNode> GetDirListing(std::string pathstring) -{ - std::vector<DirListNode> listing; - - bfsys::path path(pathstring); - - if( !exists( path ) ) return listing; - - bfsys::directory_iterator end_itr; // default construction yields past-the-end - for( bfsys::directory_iterator itr( path ); itr != end_itr; ++itr ){ - DirListNode node; - node.name = itr->leaf(); - node.dir = is_directory(*itr); - listing.push_back(node); - } - - return listing; -} - -bool CreateDir(std::string path) -{ - std::cout<<"CreateDir not implemented in boost"<<std::endl; - return false; -} - #endif -#endif - -} +} // namespace fs |