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
3 # found in the LICENSE file.
7 def CreateURLsFromPaths(file_system, directory, urlprefix):
8 '''Yields a tuple (url, prefix) for every file in |directory|, where the URL
9 is given relative to |urlprefix|.
11 for root, _, files in file_system.Walk(directory):
13 url = posixpath.join(urlprefix, root, f)
14 yield url, posixpath.join(directory, root, f)