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

Delta Between Two Patch Sets: include/AdblockPlus/FileSystem.h

Issue 10369004: File system path resolving (Closed)
Left Patch Set: Comments addressed Created April 30, 2013, 8:09 a.m.
Right Patch Set: Addressing comments Created May 5, 2013, 10:49 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 #ifndef ADBLOCKPLUS_FILE_SYSTEM_H 1 #ifndef ADBLOCK_PLUS_FILE_SYSTEM_H
2 #define ADBLOCKPLUS_FILE_SYSTEM_H 2 #define ADBLOCK_PLUS_FILE_SYSTEM_H
3 3
4 #include <istream> 4 #include <istream>
5 #include <stdint.h> 5 #include <stdint.h>
6 #include <string> 6 #include <string>
7 7
8 #include "tr1_memory.h" 8 #include "tr1_memory.h"
9 9
10 namespace AdblockPlus 10 namespace AdblockPlus
11 { 11 {
12 class FileSystem 12 class FileSystem
(...skipping 10 matching lines...) Expand all
23 virtual ~FileSystem() {} 23 virtual ~FileSystem() {}
24 virtual std::tr1::shared_ptr<std::istream> 24 virtual std::tr1::shared_ptr<std::istream>
25 Read(const std::string& path) const = 0; 25 Read(const std::string& path) const = 0;
26 virtual void Write(const std::string& path, 26 virtual void Write(const std::string& path,
27 std::tr1::shared_ptr<std::ostream> data) = 0; 27 std::tr1::shared_ptr<std::ostream> data) = 0;
28 virtual void Move(const std::string& fromPath, 28 virtual void Move(const std::string& fromPath,
29 const std::string& toPath) = 0; 29 const std::string& toPath) = 0;
30 virtual void Remove(const std::string& path) = 0; 30 virtual void Remove(const std::string& path) = 0;
31 virtual StatResult Stat(const std::string& path) const = 0; 31 virtual StatResult Stat(const std::string& path) const = 0;
32 virtual std::string Resolve(const std::string& path) const = 0; 32 virtual std::string Resolve(const std::string& path) const = 0;
33 virtual void SetBasePath(const std::string& path) = 0;
Wladimir Palant 2013/04/30 09:29:50 This shouldn't be a method of the FileSystem inter
34 protected:
35 std::string basePath;
Felix Dahlke 2013/04/30 09:14:52 I think we should either not declare basePath here
36 }; 33 };
37 34
38 typedef std::tr1::shared_ptr<FileSystem> FileSystemPtr; 35 typedef std::tr1::shared_ptr<FileSystem> FileSystemPtr;
39 } 36 }
40 37
41 #endif 38 #endif
LEFTRIGHT

Powered by Google App Engine
This is Rietveld