33 class DirectoryIteratorImp ;
43 G_EXCEPTION( StatError ,
"cannot access file" ) ;
44 G_EXCEPTION( CannotRemove ,
"cannot delete file" ) ;
45 G_EXCEPTION( CannotRename ,
"cannot rename file" ) ;
46 G_EXCEPTION( CannotCopy ,
"cannot copy file" ) ;
47 G_EXCEPTION( CannotMkdir ,
"cannot mkdir" ) ;
48 G_EXCEPTION( CannotChmod ,
"cannot chmod file" ) ;
49 G_EXCEPTION( CannotLink ,
"cannot create symlink" ) ;
50 G_EXCEPTION( CannotCreate ,
"cannot create empty file" ) ;
51 G_EXCEPTION( SizeOverflow ,
"file size overflow" ) ;
52 G_EXCEPTION( TimeError ,
"cannot get file modification time" ) ;
56 static bool remove(
const Path & path ,
const NoThrow & ) ;
59 static void remove(
const Path & path ) ;
71 static void copy(
const Path & from ,
const Path & to ) ;
74 static void copy( std::istream & from , std::ostream & to ,
75 std::streamsize limit = 0U , std::string::size_type block = 0U ) ;
82 static void mkdirs(
const Path & dir ,
int = 100 ) ;
122 static void link(
const Path & target ,
const Path & new_link ) ;
139 static std::string
copy(
const Path & ,
const Path & ,
int ) ;
140 static std::string
sizeString( g_uint32_t hi , g_uint32_t lo ) ;
141 static bool exists(
const Path & ,
bool ,
bool ) ;
142 static bool exists(
const char * ,
bool & ,
bool & ) ;
143 static bool chmodx(
const Path & file ,
bool ) ;
A subsecond-resolution timestamp based on a time_t.
static bool copy(const Path &from, const Path &to, const NoThrow &)
Copies a file. Returns false on error.
static bool isDirectory(const Path &path)
Returns true if the path exists() and is a directory.
static void create(const Path &)
Creates an empty file. Throws on error.
A simple static class for dealing with files.
static bool rename(const Path &from, const Path &to, const NoThrow &)
Renames the file. Returns false on error.
static bool mkdirs(const Path &dir, const NoThrow &, int=100)
Creates a directory and all necessary parents.
static bool executable(const Path &)
Returns true if the path is probably executable.
static bool exists(const Path &file)
Returns true if the file (directory, device etc.) exists.
static bool mkdir(const Path &dir, const NoThrow &)
Creates a directory. Returns false on error.
An overload discriminator class for File methods.
static void chmodx(const Path &file)
Makes the file executable.
static void link(const Path &target, const Path &new_link)
Creates a symlink.
static std::string sizeString(const Path &file)
Returns the file's size in string format.
A pimple-pattern implementation class for DirectoryIterator using opendir()/readdir().
static EpochTime time(const Path &file)
Returns the file's timestamp.
A Path object represents a file system path.