dbp::filesystem Class Reference

Filesystem interface. More...

#include <filesystem.h>

Inheritance diagram for dbp::filesystem:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

Filesystem interface.

This class provides an interface for file systems implementations.


Member Function Documentation

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)

Returns:
the search results iterator, pointed to 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. "*.*").

Parameters:
pattern the search pattern (mask)
Returns:
the search results iterator, pointed to the first result found
virtual std::string dbp::filesystem::get_current_dir (  )  const [pure virtual]

Determine the current directory.

Returns the current directory path.

Implemented in dbp::filefs.

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]

Set the current directory.

Changes the current directory

Implemented in dbp::filefs.


The documentation for this class was generated from the following file:

 
Support This Project
SourceForge.net Logo