From: Perttu Ahola Date: Fri, 7 Jan 2011 12:52:27 +0000 (+0200) Subject: removed boost support from filesys.cpp; default to posix X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=d38ac3aae3340beffb44cdd78a8dfd52828ec503;p=zefram%2Fminetest%2Fminetest_engine.git removed boost support from filesys.cpp; default to posix --- diff --git a/src/filesys.cpp b/src/filesys.cpp index b62d3239..a2d3f9d1 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 @@ -130,9 +130,7 @@ bool PathExists(std::string path) return (GetFileAttributes(path.c_str()) != INVALID_FILE_ATTRIBUTES); } -#else - -#ifdef linux +#else // POSIX #include #include @@ -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 GetDirListing(std::string pathstring) -{ - std::vector 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"<