Revision 565, 1.0 kB
(checked in by vbarta, 15 years ago)
|
using own error macros (basically copied from IT++, but never aborting)
|
-
Property svn:eol-style set to
native
|
Rev | Line | |
---|
[93] | 1 | // |
---|
| 2 | // C++ Interface: osutils |
---|
| 3 | // |
---|
| 4 | // Description: Agr |
---|
| 5 | // |
---|
| 6 | // |
---|
| 7 | // Author: smidl <smidl@utia.cas.cz>, (C) 2008 |
---|
| 8 | // |
---|
| 9 | // Copyright: See COPYING file that comes with this distribution |
---|
| 10 | // |
---|
| 11 | // |
---|
| 12 | |
---|
[262] | 13 | #include "itpp_ext.h" |
---|
| 14 | |
---|
[93] | 15 | using namespace std; |
---|
| 16 | |
---|
| 17 | /*! |
---|
| 18 | @brief Function concats name of a directory and file |
---|
| 19 | */ |
---|
| 20 | void get_fname ( char* filename, std::string &dirname, std::string &f ); |
---|
| 21 | |
---|
| 22 | /*! |
---|
[565] | 23 | @brief Function creates a directory |
---|
[93] | 24 | |
---|
| 25 | @param dirname name of the directory to be created |
---|
| 26 | @param rewrite if true then existence of the directory is not an error |
---|
[565] | 27 | |
---|
| 28 | Raises std::runtime_error if rewrite is false and dirname already exists. |
---|
[93] | 29 | */ |
---|
[408] | 30 | void makedir ( string &dirname, bool rewrite = true ); |
---|
[497] | 31 | |
---|
| 32 | /*! @brief Recursively removes directories and files. |
---|
| 33 | |
---|
| 34 | @param path the name (absolute or relative) of the file or directory to |
---|
| 35 | be removed (must not be empty). |
---|
| 36 | |
---|
| 37 | Returns true on success, false when path couldn't be removed because |
---|
| 38 | it didn't exist, throws an exception otherwise. |
---|
| 39 | */ |
---|
| 40 | bool remove_all ( const char *path ); |
---|