00001
00002
00003
00004 #ifndef AITOOLS_INVERTEDINDEX_SYSTEM_HPP
00005 #define AITOOLS_INVERTEDINDEX_SYSTEM_HPP
00006
00007 #include <boost/filesystem.hpp>
00008 #include <cstdio>
00009
00010 namespace bfs = boost::filesystem;
00011
00012 namespace aitools {
00013 namespace invertedindex {
00014
00024 class System {
00025
00026 private:
00027
00028 System();
00029
00030 ~System();
00031
00032 public:
00033
00034 static uint64_t directory_size(const bfs::path& path)
00035 throw (std::invalid_argument);
00036
00037 static void fclose(FILE* file);
00038
00039 static FILE* fopen(const bfs::path& path, const std::string& mode)
00040 throw (std::invalid_argument);
00041
00042 static void fread(void* data, size_t size, size_t count, FILE* file)
00043 throw (std::runtime_error);
00044
00045 static void fwrite(const void* data, size_t size, size_t count, FILE* file)
00046 throw (std::runtime_error);
00047
00048 static void fseek(FILE* file, long offset, int origin)
00049 throw (std::runtime_error);
00050
00051 static long ftell(FILE* file)
00052 throw (std::runtime_error);
00053
00054 static FILE* tmpfile()
00055 throw (std::runtime_error);
00056
00057 };
00058
00059 }
00060 }
00061
00062 #endif // AITOOLS_INVERTEDINDEX_SYSTEM_HPP