Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: include/AdblockPlus/FileSystem.h

Issue 10296001: Implement File API (Closed)
Patch Set: Created April 12, 2013, 10:10 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/AdblockPlus.h ('k') | include/AdblockPlus/JsEngine.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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;
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
OLDNEW
« no previous file with comments | « include/AdblockPlus.h ('k') | include/AdblockPlus/JsEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld