73 static void Rm(
const Path &name);
106 static bool Access(
const Path &name,
int mode);
122 inline const std::vector<Path>&
GetFiles()
const {
return files; }
124 inline const std::vector<Path>&
GetDirs()
const {
return directories; }
127 std::vector<Path> files;
128 std::vector<Path> directories;
137 # define CRNDebug(x) crn::IO::Debug(x)
139 # define CRNdout std::cout
143 # define CRNdout std::ofstream()
145 #define CRNWarning(x) crn::IO::Warning(x)
146 #define CRNVerbose(x) crn::IO::Verbose(x)
147 #define CRNError(x) crn::IO::Error(x)
149 # define CRNOptimNeeded(x) crn::IO::Warning(String(U"Optimization needed: ") + x)
151 # define CRNOptimNeeded(x)
static void Warning(const String &msg)
Prints warning messages. Please use CRNWarning() macro instead.
static void ShieldRm(const Path &name)
Removes a file and protects it with mutex.
static void Debug(const String &msg)
Prints debug messages. Please use CRNDebug() macro instead.
static std::shared_ptr< Messenger > & CurrentMessenger()
Delegate that will print the messages.
static void Copy(const Path &src, const Path &dst)
Copies a file.
static void Mkdir(const Path &name)
Creates a directory.
A handler to the content of a directory.
A UTF32 character string class.
static bool & IsQuiet()
If true, Debug, Warning, Verbose and Error don't print anything.
static bool & IsVerbose()
Controls whether CRNVerbose prints something or not.
static void Verbose(const String &msg)
Prints verbose messages. Please use CRNVerbose() macro instead.
A convenience class for file paths.
General purpose IO class.
static void Error(const String &msg)
Prints error messages. Please use CRNError() macro instead.
static void Rmdir(const Path &name)
Recursively removes a directory.
const std::vector< Path > & GetDirs() const
Returns the list of directories.
static void ShieldCopy(const Path &src, const Path &dst)
Copies a file and protects source and destination with mutex.
const std::vector< Path > & GetFiles() const
Returns the list of files.
static void Rm(const Path &name)
Removes a file.
static bool Access(const Path &name, int mode)
Checks rights on a file.
Directory(const Path &path)
Constructor.