| 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 from file_system import FileSystem | 7 from file_system import FileSystem |
| 8 from future import Future | 8 from future import Future |
| 9 | 9 |
| 10 class LocalFileSystem(FileSystem): | 10 class LocalFileSystem(FileSystem): |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 def Read(self, paths): | 36 def Read(self, paths): |
| 37 result = {} | 37 result = {} |
| 38 for path in paths: | 38 for path in paths: |
| 39 if path.endswith('/'): | 39 if path.endswith('/'): |
| 40 result[path] = self._ListDir(self._ConvertToFilepath(path)) | 40 result[path] = self._ListDir(self._ConvertToFilepath(path)) |
| 41 else: | 41 else: |
| 42 result[path] = self._ReadFile(self._ConvertToFilepath(path)) | 42 result[path] = self._ReadFile(self._ConvertToFilepath(path)) |
| 43 return Future(value=result) | 43 return Future(value=result) |
| 44 | 44 |
| 45 def Stat(self, path): | 45 def Stat(self, path): |
| 46 return self.StatInfo(0) | 46 return self.StatInfo(os.stat(os.path.join(self._base_path, path)).st_mtime) |
| OLD | NEW |