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: Addressed the new issues Created April 16, 2013, 1:37 p.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/FileReader.h ('k') | include/AdblockPlus/FilterEngine.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #ifndef ADBLOCKPLUS_FILE_SYSTEM_H
2 #define ADBLOCKPLUS_FILE_SYSTEM_H
3
4 #include <istream>
5 #include <string>
6
7 #include "tr1_memory.h"
8
9 namespace AdblockPlus
10 {
11 class FileSystem
12 {
13 public:
14 struct StatResult
15 {
16 bool exists;
17 bool isDirectory;
18 bool isFile;
19 int64_t lastModified;
20 };
21
22 virtual ~FileSystem() {}
23 virtual std::tr1::shared_ptr<std::istream>
24 Read(const std::string& path) const = 0;
25 virtual void Write(const std::string& path,
26 std::tr1::shared_ptr<std::ostream> data) = 0;
27 virtual void Move(const std::string& fromPath,
28 const std::string& toPath) = 0;
29 virtual void Remove(const std::string& path) = 0;
30 virtual StatResult Stat(const std::string& path) const = 0;
31 };
32 }
33
34 #endif
OLDNEW
« no previous file with comments | « include/AdblockPlus/FileReader.h ('k') | include/AdblockPlus/FilterEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld