| LEFT | RIGHT |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 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 22 matching lines...) Expand all Loading... |
| 33 class FileSystem | 33 class FileSystem |
| 34 { | 34 { |
| 35 public: | 35 public: |
| 36 virtual ~FileSystem() {} | 36 virtual ~FileSystem() {} |
| 37 | 37 |
| 38 /** | 38 /** |
| 39 * Reads from a file. | 39 * Reads from a file. |
| 40 * @param path File path. | 40 * @param path File path. |
| 41 * @return Buffer with the file content. | 41 * @return Buffer with the file content. |
| 42 */ | 42 */ |
| 43 virtual IFileSystem::IOBuffer | 43 virtual IFileSystem::IOBuffer Read(const std::string& path) const = 0; |
| 44 Read(const std::string& path) const = 0; | |
| 45 | 44 |
| 46 /** | 45 /** |
| 47 * Writes to a file. | 46 * Writes to a file. |
| 48 * @param path File path. | 47 * @param path File path. |
| 49 * @param data Buffer with the data to write. | 48 * @param data Buffer with the data to write. |
| 50 */ | 49 */ |
| 51 virtual void Write(const std::string& path, | 50 virtual void Write(const std::string& path, |
| 52 const IFileSystem::IOBuffer& data) = 0; | 51 const IFileSystem::IOBuffer& data) = 0; |
| 53 | 52 |
| 54 /** | 53 /** |
| (...skipping 25 matching lines...) Expand all Loading... |
| 80 virtual std::string Resolve(const std::string& path) const = 0; | 79 virtual std::string Resolve(const std::string& path) const = 0; |
| 81 }; | 80 }; |
| 82 | 81 |
| 83 /** | 82 /** |
| 84 * Shared smart pointer to a `FileSystem` instance. | 83 * Shared smart pointer to a `FileSystem` instance. |
| 85 */ | 84 */ |
| 86 typedef std::shared_ptr<FileSystem> FileSystemSyncPtr; | 85 typedef std::shared_ptr<FileSystem> FileSystemSyncPtr; |
| 87 } | 86 } |
| 88 | 87 |
| 89 #endif | 88 #endif |
| LEFT | RIGHT |