|
crawlserv++
[under development]
Application for crawling and analyzing textual content of websites.
|
Namespace for functions accessing files. More...
Classes | |
| class | Exception |
| Class for file exceptions. More... | |
Reading and Writing | |
| std::string | read (const std::string &fileName, bool binary) |
| Reads the content of the given file. More... | |
| void | write (const std::string &fileName, const std::string &content, bool binary) |
| Writes the given content to the given file. More... | |
Namespace for functions accessing files.
|
inline |
Reads the content of the given file.
| fileName | Constant reference to a string containing the name of the file to be read. |
| binary | If true, the contents will be read binarily. If false, they will be read as text. |
| File::Exception | if the file could not be opened for reading, e.g. if it does not exist. |
Referenced by crawlservpp::Main::Server::tick().
|
inline |
Writes the given content to the given file.
| fileName | Constant reference to a string containing the name of the file to be written. |
| content | Constant reference to a string containing the content to be written to the given file. |
| binary | If true, the contents will be written binarily. If false, they will be written as text. |
| File::Exception | if the file could not be opened for writing. |
Referenced by crawlservpp::Network::TorControl::newIdentity(), and crawlservpp::Main::Server::tick().