#include <System.hpp>
Static Public Member Functions | |
static uint64_t | directory_size (const bfs::path &path) throw (std::invalid_argument) |
static void | fclose (FILE *file) |
static FILE * | fopen (const bfs::path &path, const std::string &mode) throw (std::invalid_argument) |
static void | fread (void *data, size_t size, size_t count, FILE *file) throw (std::runtime_error) |
static void | fwrite (const void *data, size_t size, size_t count, FILE *file) throw (std::runtime_error) |
static void | fseek (FILE *file, long offset, int origin) throw (std::runtime_error) |
static long | ftell (FILE *file) throw (std::runtime_error) |
static FILE * | tmpfile () throw (std::runtime_error) |
Private Member Functions | |
System () | |
~System () |
A helper class to wrap some system calls to throw exceptions on failure.
Created on Jun 22, 2008
Definition at line 24 of file System.hpp.
aitools::invertedindex::System::System | ( | ) | [private] |
aitools::invertedindex::System::~System | ( | ) | [private] |
uint64_t aitools::invertedindex::System::directory_size | ( | const bfs::path & | path | ) | throw (std::invalid_argument) [static] |
Definition at line 9 of file System.cpp.
References aitools::invertedindex::Exception::throw_invalid_argument().
void aitools::invertedindex::System::fclose | ( | FILE * | file | ) | [static] |
Definition at line 25 of file System.cpp.
Referenced by aitools::invertedindex::MPHashFunction::create(), aitools::invertedindex::MPHashFunction::load(), and aitools::invertedindex::MPHashFunction::save().
FILE * aitools::invertedindex::System::fopen | ( | const bfs::path & | path, | |
const std::string & | mode | |||
) | throw (std::invalid_argument) [static] |
Definition at line 32 of file System.cpp.
References aitools::util::fopen(), and aitools::invertedindex::Exception::throw_invalid_argument().
Referenced by aitools::invertedindex::StorageBuilder::close(), aitools::invertedindex::MPHashFunction::create(), aitools::invertedindex::MPHashFunction::load(), aitools::invertedindex::StorageSearcher::open(), and aitools::invertedindex::MPHashFunction::save().
void aitools::invertedindex::System::fread | ( | void * | data, | |
size_t | size, | |||
size_t | count, | |||
FILE * | file | |||
) | throw (std::runtime_error) [static] |
Definition at line 44 of file System.cpp.
References aitools::util::fread(), and aitools::invertedindex::Exception::throw_runtime_error().
Referenced by aitools::invertedindex::StorageSearcher::open().
void aitools::invertedindex::System::fseek | ( | FILE * | file, | |
long | offset, | |||
int | origin | |||
) | throw (std::runtime_error) [static] |
Definition at line 68 of file System.cpp.
References aitools::util::fseek(), and aitools::invertedindex::Exception::throw_runtime_error().
long aitools::invertedindex::System::ftell | ( | FILE * | file | ) | throw (std::runtime_error) [static] |
Definition at line 79 of file System.cpp.
References aitools::util::ftell(), and aitools::invertedindex::Exception::throw_runtime_error().
void aitools::invertedindex::System::fwrite | ( | const void * | data, | |
size_t | size, | |||
size_t | count, | |||
FILE * | file | |||
) | throw (std::runtime_error) [static] |
Definition at line 56 of file System.cpp.
References aitools::util::fwrite(), and aitools::invertedindex::Exception::throw_runtime_error().
Referenced by aitools::invertedindex::PostlistBuilder::append().
FILE * aitools::invertedindex::System::tmpfile | ( | ) | throw (std::runtime_error) [static] |
Definition at line 91 of file System.cpp.
References aitools::util::throw_runtime_error(), and aitools::util::tmpfile().
Referenced by aitools::invertedindex::ExternalMergeSort::swap_out().