root/library/bdm/osutils.h @ 565

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
Line 
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
13#include "itpp_ext.h"
14
15using namespace std;
16
17/*!
18@brief Function concats name of a directory and file
19*/
20void get_fname ( char* filename, std::string &dirname, std::string &f );
21
22/*!
23@brief Function creates a directory
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
27
28Raises std::runtime_error if rewrite is false and dirname already exists.
29*/
30void makedir ( string &dirname, bool rewrite = true );
31
32/*! @brief Recursively removes directories and files.
33
34@param path the name (absolute or relative) of the file or directory to
35be removed (must not be empty).
36
37Returns true on success, false when path couldn't be removed because
38it didn't exist, throws an exception otherwise.
39*/
40bool remove_all ( const char *path );
Note: See TracBrowser for help on using the browser.