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

Side by Side Diff: chrome/common/extensions/docs/server2/file_system.py

Issue 14218004: Devserver: only populate data during cron jobs, meaning all data from instances (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix integration test Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 6
7 class FileNotFoundError(Exception): 7 class FileNotFoundError(Exception):
8 def __init__(self, filename): 8 def __init__(self, filename):
9 Exception.__init__(self, filename) 9 Exception.__init__(self, filename)
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 return self.Read([path], binary=binary).Get()[path] 56 return self.Read([path], binary=binary).Get()[path]
57 57
58 # TODO(cduvall): Allow Stat to take a list of paths like Read. 58 # TODO(cduvall): Allow Stat to take a list of paths like Read.
59 def Stat(self, path): 59 def Stat(self, path):
60 '''Returns a |StatInfo| object containing the version of |path|. If |path| 60 '''Returns a |StatInfo| object containing the version of |path|. If |path|
61 is a directory, |StatInfo| will have the versions of all the children of 61 is a directory, |StatInfo| will have the versions of all the children of
62 the directory in |StatInfo.child_versions|. 62 the directory in |StatInfo.child_versions|.
63 ''' 63 '''
64 raise NotImplementedError() 64 raise NotImplementedError()
65 65
66 def GetVersion(self): 66 @classmethod
67 def GetName(cls):
68 '''The type of the file system, exposed for caching classes to namespace
69 their caches. It is unlikely that this needs to be overridden.
70 '''
71 return cls.__name__
72
73 @classmethod
74 def GetVersion(cls):
67 '''The version of the file system, exposed for caching classes backed to 75 '''The version of the file system, exposed for caching classes backed to
68 file systems. This is unlikely to change. 76 file systems. It is unlikely that this needs to be overridden.
69 ''' 77 '''
70 return None 78 return None
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/server2/datastore_models.py ('k') | chrome/common/extensions/docs/server2/github_file_system.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698