00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _utils_FILE
00021 #define _utils_FILE 1
00022
00023 #include <string>
00024
00030 namespace utils {
00031 class File;
00032 };
00033
00041 class utils::File {
00042 public:
00043 class Exception {};
00044 class IOError : Exception {};
00045 class MEMError : Exception {};
00046 class AlreadyPresent : Exception {};
00047 class NotFound : IOError {};
00048
00049 static void write(const string &s, const string &name, const string &dir, bool always=false)
00050 throw(MEMError, IOError, AlreadyPresent);
00051 static string read(const string &name, const string &dir)
00052 throw(MEMError, IOError, NotFound);
00053 static void remove(const string &name, const string &dir)
00054 throw(IOError, NotFound);
00055 };
00056
00057 #endif