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-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 bool exists; | 42 bool exists; |
43 bool isDirectory; | 43 bool isDirectory; |
44 bool isFile; | 44 bool isFile; |
45 int64_t lastModified; | 45 int64_t lastModified; |
46 }; | 46 }; |
47 | 47 |
48 virtual ~FileSystem() {} | 48 virtual ~FileSystem() {} |
49 virtual std::tr1::shared_ptr<std::istream> | 49 virtual std::tr1::shared_ptr<std::istream> |
50 Read(const std::string& path) const = 0; | 50 Read(const std::string& path) const = 0; |
51 virtual void Write(const std::string& path, | 51 virtual void Write(const std::string& path, |
52 std::tr1::shared_ptr<std::ostream> data) = 0; | 52 std::tr1::shared_ptr<std::istream> data) = 0; |
53 virtual void Move(const std::string& fromPath, | 53 virtual void Move(const std::string& fromPath, |
54 const std::string& toPath) = 0; | 54 const std::string& toPath) = 0; |
55 virtual void Remove(const std::string& path) = 0; | 55 virtual void Remove(const std::string& path) = 0; |
56 virtual StatResult Stat(const std::string& path) const = 0; | 56 virtual StatResult Stat(const std::string& path) const = 0; |
57 virtual std::string Resolve(const std::string& path) const = 0; | 57 virtual std::string Resolve(const std::string& path) const = 0; |
58 }; | 58 }; |
59 | 59 |
60 typedef std::tr1::shared_ptr<FileSystem> FileSystemPtr; | 60 typedef std::tr1::shared_ptr<FileSystem> FileSystemPtr; |
61 } | 61 } |
62 | 62 |
63 #endif | 63 #endif |
OLD | NEW |