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

Unified Diff: include/AdblockPlus/DefaultFileSystem.h

Issue 5728380594946048: Issue 116 - Document the libadblockplus API (Closed)
Patch Set: Address all comments Created Sept. 1, 2014, 4:59 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: include/AdblockPlus/DefaultFileSystem.h
===================================================================
--- a/include/AdblockPlus/DefaultFileSystem.h
+++ b/include/AdblockPlus/DefaultFileSystem.h
@@ -28,6 +28,12 @@
namespace AdblockPlus
{
+ /**
+ * `FileSystem` implementation that interacts directly with the operating
+ * system's file system.
+ * All paths are considered relative to the base path, or to the current
+ * working directory if no base path is set (see `SetBasePath()`).
+ */
class DefaultFileSystem : public FileSystem
{
public:
@@ -39,7 +45,13 @@
void Remove(const std::string& path);
StatResult Stat(const std::string& path) const;
std::string Resolve(const std::string& path) const;
+
+ /**
+ * Sets the base path, all paths are considered relative to it.
+ * @param path Base path.
+ */
void SetBasePath(const std::string& path);
+
protected:
std::string basePath;
};

Powered by Google App Engine
This is Rietveld