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

Unified Diff: include/AdblockPlus/DefaultFileSystem.h

Issue 29527821: Issue 5556 - Update to use libadblockplus revision hg:36e9993fa36c (Closed)
Patch Set: Created Aug. 25, 2017, 6:12 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
« no previous file with comments | « include/AdblockPlus/AppInfo.h ('k') | include/AdblockPlus/DefaultLogSystem.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/DefaultFileSystem.h
diff --git a/include/AdblockPlus/DefaultFileSystem.h b/include/AdblockPlus/DefaultFileSystem.h
deleted file mode 100644
index 75ad13030b30759f5df448a7a313a58228e49b3f..0000000000000000000000000000000000000000
--- a/include/AdblockPlus/DefaultFileSystem.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * This file is part of Adblock Plus <https://adblockplus.org/>,
- * Copyright (C) 2006-2017 eyeo GmbH
- *
- * Adblock Plus is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Adblock Plus is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef ADBLOCK_PLUS_DEFAULT_FILE_SYSTEM_H
-#define ADBLOCK_PLUS_DEFAULT_FILE_SYSTEM_H
-
-#include "FileSystem.h"
-
-#ifdef _WIN32
-#define PATH_SEPARATOR '\\'
-#else
-#define PATH_SEPARATOR '/'
-#endif
-
-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 DefaultFileSystemSync : public FileSystem
- {
- public:
- IFileSystem::IOBuffer Read(const std::string& path) const;
- void Write(const std::string& path, const IFileSystem::IOBuffer& data);
- void Move(const std::string& fromPath, const std::string& toPath);
- void Remove(const std::string& path);
- IFileSystem::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;
- };
-
- class DefaultFileSystem : public IFileSystem
- {
- public:
- explicit DefaultFileSystem(const FileSystemSyncPtr& syncImpl);
- void Read(const std::string& path,
- const ReadCallback& callback) const;
- void Write(const std::string& path,
- const IOBuffer& data,
- const Callback& callback);
- void Move(const std::string& fromPath,
- const std::string& toPath,
- const Callback& callback);
- void Remove(const std::string& path, const Callback& callback);
- void Stat(const std::string& path,
- const StatCallback& callback) const;
-
- std::string Resolve(const std::string& path) const;
- private:
- FileSystemSyncPtr syncImpl;
- };
-}
-
-#endif
« no previous file with comments | « include/AdblockPlus/AppInfo.h ('k') | include/AdblockPlus/DefaultLogSystem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld