| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 #ifndef ADBLOCKPLUS_FILE_READER_H | 1 #ifndef ADBLOCKPLUS_FILE_SYSTEM_H |
| 2 #define ADBLOCKPLUS_FILE_READER_H | 2 #define ADBLOCKPLUS_FILE_SYSTEM_H |
| 3 | 3 |
| 4 #include <istream> | 4 #include <istream> |
| 5 #include <string> | 5 #include <string> |
| 6 #include <memory> | 6 #include <memory> |
| 7 | 7 |
| 8 namespace AdblockPlus | 8 namespace AdblockPlus |
| 9 { | 9 { |
| 10 class FileReader | 10 class FileSystem |
| 11 { | 11 { |
| 12 public: | 12 public: |
| 13 virtual ~FileReader(); | 13 struct StatResult |
| 14 { | |
| 15 bool exists; | |
| 16 bool isDirectory; | |
| 17 bool isFile; | |
| 18 int lastModified; | |
| 19 }; | |
| 20 | |
| 21 virtual ~FileSystem() {} | |
| 14 virtual std::auto_ptr<std::istream> Read(const std::string& path) const = 0; | 22 virtual std::auto_ptr<std::istream> Read(const std::string& path) const = 0; |
|
Wladimir Palant
2013/04/12 16:10:35
I guess the reason for not returning std::string h
Felix Dahlke
2013/04/15 03:43:34
It's probably not really needed, as the whole stri
| |
| 23 virtual void Write(const std::string& path, const std::string& content) = 0; | |
| 24 virtual void Move(const std::string& fromPath, | |
| 25 const std::string& toPath) = 0; | |
| 26 virtual void Remove(const std::string& path) = 0; | |
| 27 virtual StatResult Stat(const std::string& path) const = 0; | |
| 15 }; | 28 }; |
| 16 } | 29 } |
| 17 | 30 |
| 18 #endif | 31 #endif |
| OLD | NEW |