Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4189)

Unified Diff: chrome/common/extensions/docs/server2/file_system.py

Issue 10704252: Extensions Docs Server: Internal file system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed up Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/file_system.py
diff --git a/chrome/common/extensions/docs/server2/file_system.py b/chrome/common/extensions/docs/server2/file_system.py
new file mode 100644
index 0000000000000000000000000000000000000000..af8c5018459a14909aa963223a9a3cf1667f20f5
--- /dev/null
+++ b/chrome/common/extensions/docs/server2/file_system.py
@@ -0,0 +1,25 @@
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+class FileSystem(object):
+ """A FileSystem interface that can read files and directories.
+ """
+ class StatInfo(object):
+ """The result of calling Stat on a FileSystem.
+ """
+ def __init__(self, version):
+ self.version = version
+
+ def Read(self, paths):
+ """Reads each file in paths and returns a dictionary mapping the path to the
+ contents. If a path in paths ends with a '/', it is assumed to be a
+ directory, and a list of files in the directory is mapped to the path.
+ """
+ raise NotImplementedError()
+
+ def Stat(self, path):
+ """Gets the version number of |path| if it is a directory, or the parent
+ directory if it is a file.
+ """
+ raise NotImplementedError()
« no previous file with comments | « chrome/common/extensions/docs/server2/fetcher_cache.py ('k') | chrome/common/extensions/docs/server2/file_system_cache.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698