BARE2D
Filesystem.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #define BOOST_FILESYSTEM_NO_DEPRECATED
4 #include <boost/filesystem.hpp>
5 #undef BOOST_FILESYSTEM_NO_DEPRECATED
6 
7 namespace BARE2D {
8 
9  class Filesystem {
10  public:
11  /**
12  * @brief Gets all the names of directories at the given path
13  * @param path The path to check
14  * @return A vector of string names of directories
15  */
16  static std::vector<std::string> getDirectoriesIn(std::string path);
17 
18  /**
19  * @brief Gets all the names of files at the given path
20  * @param path The path to check
21  * @return A vector of string names of files
22  */
23  static std::vector<std::string> getFilesIn(std::string path);
24 
25  /**
26  * @return The path to the program's working directory.
27  */
28  static std::string getWorkingDirectory();
29  };
30 
31 } // namespace BARE2D
BARE2D::Filesystem::getFilesIn
static std::vector< std::string > getFilesIn(std::string path)
Gets all the names of files at the given path.
Definition: Filesystem.cpp:29
BARE2D::Filesystem::getWorkingDirectory
static std::string getWorkingDirectory()
Definition: Filesystem.cpp:51
BARE2D
Definition: App.cpp:13
BARE2D::Filesystem
Definition: Filesystem.hpp:9
BARE2D::Filesystem::getDirectoriesIn
static std::vector< std::string > getDirectoriesIn(std::string path)
Gets all the names of directories at the given path.
Definition: Filesystem.cpp:7