34 class DirectoryIteratorImp ;
45 G_EXCEPTION( CannotRemove ,
"cannot delete file" ) ;
46 G_EXCEPTION( CannotRename ,
"cannot rename file" ) ;
50 G_EXCEPTION( CannotLink ,
"cannot create symlink" ) ;
51 G_EXCEPTION( CannotCreate ,
"cannot create empty file" ) ;
52 G_EXCEPTION( SizeOverflow ,
"file size overflow" ) ;
53 G_EXCEPTION( TimeError ,
"cannot get file modification time" ) ;
59 static bool remove(
const Path & path ,
const NoThrow & ) ;
62 static void remove(
const Path & path ) ;
74 static void copy(
const Path & from ,
const Path & to ) ;
77 static void copy( std::istream & from , std::ostream & to ,
85 static void mkdirs(
const Path & dir ,
int = 100 ) ;
108 static time_type
time(
const Path & file ) ;
121 static void link(
const Path & target ,
const Path & new_link ) ;
138 static std::string
copy(
const Path & ,
const Path & ,
int ) ;
139 static std::string
sizeString( g_uint32_t hi , g_uint32_t lo ) ;
140 static bool exists(
const Path & ,
bool ,
bool ) ;
141 static bool exists(
const char * ,
bool & ) ;
142 static bool chmodx(
const Path & file ,
bool ) ;
static bool copy(const Path &from, const Path &to, const NoThrow &)
Copies a file. Returns false on error.
DateTime::EpochTime time_type
static void create(const Path &)
Creates an empty file. Throws on error.
std::string::size_type size_type
A std::size_t type.
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, link, 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.
#define G_EXCEPTION(class_name, description)
define as a function rather than a type if optimising for size
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.
A Path object represents a file system path.
static time_type time(const Path &file)
Returns the file's timestamp.