Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 import re | |
| 6 | |
| 7 from async_fetch_value import AsyncFetchValue | |
| 8 from file_system import FileSystem | |
| 9 from lazy_value import LazyValue | |
| 10 | |
| 11 class SubversionFileSystem(FileSystem): | |
|
not at google - send to devlin
2012/07/18 10:39:16
sweeet
| |
| 12 """Class to fetch resources from src.chromium.org. | |
| 13 """ | |
| 14 def __init__(self, fetcher): | |
| 15 self._fetcher = fetcher | |
| 16 | |
| 17 def Read(self, paths): | |
| 18 return LazyValue(delegate=AsyncFetchValue(paths, self._fetcher)) | |
| 19 | |
| 20 def Stat(self, path): | |
| 21 dir_html = self._fetcher.fetch(path).content | |
| 22 return self.StatInfo(int(re.search('([0-9]+)', dir_html).group(0))) | |
| OLD | NEW |