OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 13 matching lines...) Expand all Loading... |
24 #define PATH_SEPARATOR '\\' | 24 #define PATH_SEPARATOR '\\' |
25 #else | 25 #else |
26 #define PATH_SEPARATOR '/' | 26 #define PATH_SEPARATOR '/' |
27 #endif | 27 #endif |
28 | 28 |
29 namespace AdblockPlus | 29 namespace AdblockPlus |
30 { | 30 { |
31 class DefaultFileSystem : public FileSystem | 31 class DefaultFileSystem : public FileSystem |
32 { | 32 { |
33 public: | 33 public: |
34 std::tr1::shared_ptr<std::istream> Read(const std::string& path) const; | 34 std::shared_ptr<std::istream> Read(const std::string& path) const; |
35 void Write(const std::string& path, | 35 void Write(const std::string& path, |
36 std::tr1::shared_ptr<std::istream> data); | 36 std::shared_ptr<std::istream> data); |
37 void Move(const std::string& fromPath, | 37 void Move(const std::string& fromPath, |
38 const std::string& toPath); | 38 const std::string& toPath); |
39 void Remove(const std::string& path); | 39 void Remove(const std::string& path); |
40 StatResult Stat(const std::string& path) const; | 40 StatResult Stat(const std::string& path) const; |
41 std::string Resolve(const std::string& path) const; | 41 std::string Resolve(const std::string& path) const; |
42 void SetBasePath(const std::string& path); | 42 void SetBasePath(const std::string& path); |
43 protected: | 43 protected: |
44 std::string basePath; | 44 std::string basePath; |
45 }; | 45 }; |
46 } | 46 } |
47 | 47 |
48 #endif | 48 #endif |
OLD | NEW |