Logo Search packages:      
Sourcecode: ccbuild version File versions

bneijt::FileSystem Class Reference

#include <FileSystem.hh>

List of all members.


Detailed Description

FileSystem.

A small collection of FileSystem functions.

Definition at line 32 of file FileSystem.hh.


Static Public Member Functions

static std::string baseName (std::string const &filename)
 Returns base of the filename (filename, withouth path, without extension).
static std::string cleanPath (std::string const &filename)
 Returns a cleaner version of the given path ("./a/../b" -> "./b").
static std::string cwd ()
 Return the current working directory.
static std::string directoryName (std::string const &filename)
 Returns the directory part of a path.
static void ensureDirectory (std::string const &directoryName)
 If the given directory doesn't exist, create it.
static bool fileExists (std::string const &filename)
 Returns true if the file exists, in any form (it may be a directory).
static std::string fileName (std::string const &filename)
 Returns the filename (filename, withouth path).
static void globDirectoriesInto (std::vector< std::string > *list, std::string const &pattern, bool sort=false)
 Get a vector of regular directories matching the glob pattern.
static void globFilesInto (std::vector< std::string > *list, std::string const &pattern, bool sort=true)
 Get a vector of regular files matching the glob pattern.
static void globInto (std::vector< std::string > *list, std::string const &pattern, bool sort=true)
 Get a vector of files matching the glob pattern.
static void globSourceFilesInto (std::vector< std::string > *list, std::string const &directory)
 Get a vector of regular files matching the glob pattern.
static bool isReadable (std::string const &file)
 Returns true when the given file is readable.
static time_t modTime (std::string const &file)
 Return the modification time for the given file.
static bool newer (std::string const &file1, std::string const &file2)
 Check wether file1 is newer then file2 If either file doesn't exist, the function returns false.
static void recursiveGlobDirectoriesInto (std::vector< std::string > *list, std::string const &directory)
 Glob all subdirectories of this directory.
static bool rmIfExists (std::string const &filename)
 Remove the file it it exitst, return true on succes.
static bool touch (std::string const &filename)
 Touch the given file.

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

Generated by  Doxygen 1.6.0   Back to index