Filesystem interface. More...
#include <filesystem.h>

Classes | |
| class | const_iterator |
| Filesystem search results iterator. More... | |
Public Member Functions | |
| virtual | ~filesystem () |
| Destructor. | |
| virtual std::string | get_path_delimiter () const =0 |
| Obtain default path delimiter. | |
| virtual std::string | get_current_dir () const =0 |
| Determine the current directory. | |
| virtual void | set_current_dir (const std::string &name) const =0 |
| Set the current directory. | |
| virtual std::string | get_temp_dir () const =0 |
| Obtain a temporary directory. | |
| virtual std::string | get_home_dir () const =0 |
| Obtain current user's home directory. | |
| virtual std::string | get_locale_dir () const =0 |
| Obtain the locale-dependent data directory. | |
| virtual std::string | get_system_config_dir () const =0 |
| Obtain the directory with configuration files. | |
| virtual std::string | get_data_dir () const =0 |
| Obtain the application data directory. | |
| const_iterator | find (const std::string &pattern) |
| Search a file by mask. | |
| const_iterator | end () |
| Points to the end of the file search list. | |
Protected Member Functions | |
| virtual bool | find_first_file (const std::string &pattern, std::string &filename)=0 |
| virtual bool | find_next_file (std::string &filename)=0 |
Friends | |
| class | const_iterator |
| class | filefs |
Filesystem interface.
This class provides an interface for file systems implementations.
| const_iterator dbp::filesystem::end | ( | ) | [inline] |
Points to the end of the file search list.
Provides an iterator of file search results (the last result found)
| const_iterator dbp::filesystem::find | ( | const std::string & | pattern | ) | [inline] |
Search a file by mask.
Provides an iterator of file search results, specified by mask (e.g. "*.*").
| pattern | the search pattern (mask) |
| virtual std::string dbp::filesystem::get_current_dir | ( | ) | const [pure virtual] |
| virtual std::string dbp::filesystem::get_data_dir | ( | ) | const [pure virtual] |
Obtain the application data directory.
Returns the directory where application data files (images, icons, resources...) are kept.
Implemented in dbp::filefs.
| virtual std::string dbp::filesystem::get_home_dir | ( | ) | const [pure virtual] |
Obtain current user's home directory.
Returns the current user home directory path (aka profile).
Implemented in dbp::filefs.
| virtual std::string dbp::filesystem::get_locale_dir | ( | ) | const [pure virtual] |
Obtain the locale-dependent data directory.
Returns the directory where localization files are installed.
Implemented in dbp::filefs.
| virtual std::string dbp::filesystem::get_path_delimiter | ( | ) | const [pure virtual] |
Obtain default path delimiter.
Returns the symbol(s) used for delimiting path elements in the current operating system.
Implemented in dbp::filefs.
| virtual std::string dbp::filesystem::get_system_config_dir | ( | ) | const [pure virtual] |
Obtain the directory with configuration files.
Returns the directory where configuration files are kept.
Implemented in dbp::filefs.
| virtual std::string dbp::filesystem::get_temp_dir | ( | ) | const [pure virtual] |
Obtain a temporary directory.
Returns the system temporary directory path. It should be suitable path for creating of temporary files.
Implemented in dbp::filefs.
| virtual void dbp::filesystem::set_current_dir | ( | const std::string & | name | ) | const [pure virtual] |