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

Side by Side Diff: build/android/gyp/find.py

Issue 361633002: [Android][gn] Add android resources templates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-java
Patch Set: Created 6 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
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 #
3 # Copyright 2014 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 """Finds files in directories.
8 """
9
10 import fnmatch
11 import optparse
12 import os
13 import sys
14
newt (away) 2014/07/07 21:47:11 two newlines
cjhopman 2014/07/08 00:16:26 Done.
15 def main(argv):
16 parser = optparse.OptionParser()
17 parser.add_option('--pattern', default='*', help='File pattern to match.')
18 options, directories = parser.parse_args(argv)
19
20 for d in directories:
21 for root, _, filenames in os.walk(d):
22 for f in fnmatch.filter(filenames, options.pattern):
23 print os.path.join(root, f)
24
25 if __name__ == '__main__':
26 sys.exit(main(sys.argv[1:]))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698