X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdir.h;fp=source%2Fdir.h;h=25ec776b2b814f4616e32f9a83d59ebe18d3bb6e;hb=f91f1df3e0b00b3a270e571d4b2c8251da4d1226;hp=0000000000000000000000000000000000000000;hpb=e6fec68039fb5212993d687d352c540e407e6d96;p=libs%2Fcore.git diff --git a/source/dir.h b/source/dir.h new file mode 100644 index 0000000..25ec776 --- /dev/null +++ b/source/dir.h @@ -0,0 +1,46 @@ +/* $Id$ + +This file is part of libmspfs +Copyright © 2006-2008 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + +#ifndef MSP_FS_DIR_H_ +#define MSP_FS_DIR_H_ + +#include +#include + +namespace Msp { +namespace FS { + +class Path; + +/// Creates a directory +void mkdir(const Path &path, int mode); + +/// Creates a directory and any required parent directories +void mkpath(const Path &path, int mode); + +/// Removes a directory +void rmdir(const Path &path); + +/// Removes a directory and anything it contains +void rmdirs(const Path &path); + +/// Lists the contents of a directory +std::list list_files(const Path &path); + +/// Returns the current working directory +Path getcwd(); + +/// Returns the user's home directory +Path get_home_dir(); + +/// Changes the current working directory +void chdir(const Path &); + +} // namespace FS +} // namespace Msp + +#endif