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 def _ProcessFileData(data, path): | 7 def _ProcessFileData(data, path): |
| 8 if os.path.splitext(path)[-1] not in ['.js', '.html', '.json']: | 8 if os.path.splitext(path)[-1] not in ['.js', '.html', '.json']: |
| 9 return data | 9 return data |
| 10 try: | 10 try: |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 def ReadSingle(self, path): | 35 def ReadSingle(self, path): |
| 36 """Reads a single file from the FileSystem. | 36 """Reads a single file from the FileSystem. |
| 37 """ | 37 """ |
| 38 return self.Read([path]).Get()[path] | 38 return self.Read([path]).Get()[path] |
| 39 | 39 |
| 40 def Stat(self, path): | 40 def Stat(self, path): |
| 41 """Gets the version number of |path| if it is a directory, or the parent | 41 """Gets the version number of |path| if it is a directory, or the parent |
| 42 directory if it is a file. | 42 directory if it is a file. |
| 43 """ | 43 """ |
| 44 raise NotImplementedError() | 44 raise NotImplementedError() |
| 45 | |
| 46 def CheckStat(self, version1, version2): | |
| 47 """Returns True if cache is expired. | |
| 48 """ | |
| 49 return version1 > version2 | |
|
not at google - send to devlin
2012/08/02 13:27:48
This won't work for git.
cduvall
2012/08/02 23:20:01
I had this overridden in GithubFileSystem using !=
| |
| OLD | NEW |