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

Side by Side Diff: include/AdblockPlus/DefaultFileSystem.h

Issue 5163715573841920: Issue 768 - Switch from TR1 to C++11 (Closed)
Patch Set: rebase Created Aug. 5, 2015, 10:38 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 19 matching lines...) Expand all
30 { 30 {
31 /** 31 /**
32 * `FileSystem` implementation that interacts directly with the operating 32 * `FileSystem` implementation that interacts directly with the operating
33 * system's file system. 33 * system's file system.
34 * All paths are considered relative to the base path, or to the current 34 * All paths are considered relative to the base path, or to the current
35 * working directory if no base path is set (see `SetBasePath()`). 35 * working directory if no base path is set (see `SetBasePath()`).
36 */ 36 */
37 class DefaultFileSystem : public FileSystem 37 class DefaultFileSystem : public FileSystem
38 { 38 {
39 public: 39 public:
40 std::tr1::shared_ptr<std::istream> Read(const std::string& path) const; 40 std::shared_ptr<std::istream> Read(const std::string& path) const;
41 void Write(const std::string& path, 41 void Write(const std::string& path,
42 std::tr1::shared_ptr<std::istream> data); 42 std::shared_ptr<std::istream> data);
Felix Dahlke 2015/08/05 21:28:04 Nit: This was wrapped because it didn't fit in 80
sergei 2015/08/06 07:35:26 Fixed and the line below.
43 void Move(const std::string& fromPath, 43 void Move(const std::string& fromPath,
44 const std::string& toPath); 44 const std::string& toPath);
45 void Remove(const std::string& path); 45 void Remove(const std::string& path);
46 StatResult Stat(const std::string& path) const; 46 StatResult Stat(const std::string& path) const;
47 std::string Resolve(const std::string& path) const; 47 std::string Resolve(const std::string& path) const;
48 48
49 /** 49 /**
50 * Sets the base path, all paths are considered relative to it. 50 * Sets the base path, all paths are considered relative to it.
51 * @param path Base path. 51 * @param path Base path.
52 */ 52 */
53 void SetBasePath(const std::string& path); 53 void SetBasePath(const std::string& path);
54 54
55 protected: 55 protected:
56 std::string basePath; 56 std::string basePath;
57 }; 57 };
58 } 58 }
59 59
60 #endif 60 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld