| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 posixpath | 5 import posixpath |
| 6 | 6 |
| 7 from docs_server_utils import StringIdentity | 7 from docs_server_utils import StringIdentity |
| 8 from file_system import FileSystem | 8 from file_system import FileSystem |
| 9 from future import Future | 9 from future import Future |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 for path, content in results.iteritems()) | 37 for path, content in results.iteritems()) |
| 38 return self._file_system.Read(tuple(prefix(path) for path in paths), | 38 return self._file_system.Read(tuple(prefix(path) for path in paths), |
| 39 skip_not_found-skip_not_found).Then(next) | 39 skip_not_found-skip_not_found).Then(next) |
| 40 | 40 |
| 41 def Refresh(self): | 41 def Refresh(self): |
| 42 return self._file_system.Refresh() | 42 return self._file_system.Refresh() |
| 43 | 43 |
| 44 def Stat(self, path): | 44 def Stat(self, path): |
| 45 return self._file_system.Stat(posixpath.join(self._root, path)) | 45 return self._file_system.Stat(posixpath.join(self._root, path)) |
| 46 | 46 |
| 47 def GetIdentity(self): | 47 def GetStableIdentity(self): |
| 48 return StringIdentity( | 48 return StringIdentity( |
| 49 '%s/%s' % (self._file_system.GetIdentity(), self._root)) | 49 '%s/%s' % (self._file_system.GetIdentity(), self._root)) |
| 50 | 50 |
| 51 def __repr__(self): | 51 def __repr__(self): |
| 52 return 'ChrootFileSystem(%s, %s)' % ( | 52 return 'ChrootFileSystem(%s, %s)' % ( |
| 53 self._root, repr(self._file_system)) | 53 self._root, repr(self._file_system)) |
| OLD | NEW |