Go to the documentation of this file.
   18 #ifndef SDF_FILESYSTEM_HH_ 
   19 #define SDF_FILESYSTEM_HH_ 
   24 #include <gz/utils/ImplPtr.hh> 
   31   inline namespace SDF_VERSION_NAMESPACE {
 
   40     bool exists(
const std::string &_path);
 
   63     std::string 
const separator(std::string 
const &_s);
 
   69     template<
typename... Args>
 
   70     std::string 
append(Args 
const &... args)
 
   75       static_cast<void>(unpack);
 
   76       return result.substr(0, result.length() - 1);
 
   88     std::string 
basename(
const std::string &_path);
 
   96       public: 
explicit DirIter(
const std::string &_in);
 
  103       public: std::string operator*() 
const;
 
  107       public: 
const DirIter& operator++();
 
  113       public: 
bool operator!=(
const DirIter &_other) 
const;
 
  119       private: 
void next();
 
  122       private: 
void set_internal_empty();
 
  125       private: 
void close_handle();
 
  128       GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr)
 
  
namespace for Simulation Description Format parser
Definition: Actor.hh:34
 
GZ_SDFORMAT_VISIBLE bool exists(const std::string &_path)
Determine whether the given path exists on the filesystem.
 
#define SDFORMAT_VISIBLE
Definition: system_util.hh:25
 
GZ_SDFORMAT_VISIBLE bool create_directory(const std::string &_path)
Create a new directory on the filesystem.
 
std::string append(Args const &... args)
Append one or more additional path elements to the first passed in argument.
Definition: Filesystem.hh:70
 
GZ_SDFORMAT_VISIBLE const std::string separator(std::string const &_s)
Append the preferred path separator character for this platform onto the passed-in string.
 
GZ_SDFORMAT_VISIBLE std::string current_path()
Get the current working path.
 
GZ_SDFORMAT_VISIBLE std::string basename(const std::string &_path)
Given a path, get just the basename portion.
 
GZ_SDFORMAT_VISIBLE bool is_directory(const std::string &_path)
Determine whether the given path is a directory.
 
A class for iterating over all items in a directory.
Definition: Filesystem.hh:92