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

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

Issue 10808065: Extensions Docs Server: TDS fix, no local caching (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 8 years, 5 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 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
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)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698