Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 return self.Read([path], binary=binary).Get()[path] | 59 return self.Read([path], binary=binary).Get()[path] |
| 60 | 60 |
| 61 # TODO(cduvall): Allow Stat to take a list of paths like Read. | 61 # TODO(cduvall): Allow Stat to take a list of paths like Read. |
| 62 def Stat(self, path): | 62 def Stat(self, path): |
| 63 '''Returns a |StatInfo| object containing the version of |path|. If |path| | 63 '''Returns a |StatInfo| object containing the version of |path|. If |path| |
| 64 is a directory, |StatInfo| will have the versions of all the children of | 64 is a directory, |StatInfo| will have the versions of all the children of |
| 65 the directory in |StatInfo.child_versions|. | 65 the directory in |StatInfo.child_versions|. |
| 66 ''' | 66 ''' |
| 67 raise NotImplementedError() | 67 raise NotImplementedError() |
| 68 | 68 |
| 69 @classmethod | 69 def GetIdentity(self): |
| 70 def GetName(cls): | 70 '''The identity of the file system, exposed for caching classes to |
| 71 '''The type of the file system, exposed for caching classes to namespace | 71 namespace their caches. The will usually depend on the configuration of that |
|
cduvall
2013/05/08 03:09:14
The -> This
not at google - send to devlin
2013/05/08 18:26:19
Done.
| |
| 72 their caches. It is unlikely that this needs to be overridden. | 72 file system - e.g. a LocalFileSystem with a base path of /var is different |
| 73 to that of a SubversionFileSystem with a base path of /bar, is different to | |
| 74 a LocalFileSystem with a base path of /usr. | |
| 73 ''' | 75 ''' |
| 74 return cls.__name__ | 76 raise NotImplementedError() |
| OLD | NEW |