ȏKQc@sOdZddlZddlZdZejdZdZdedZ dS(s6Shared utility functions for scanning directory trees.iNsnnaze@google.com (Nathan Naze)s^.+\.js$cCst|dtS(sScans a directory tree for JavaScript files. Args: root: str, Path to a root directory. Returns: An iterable of paths to JS files, relative to cwd. t path_filter(tScanTreet_JS_FILE_REGEX(troot((sS/Users/alexmahan/git/google-earth-day/closure/library/closure/bin/build/treescan.pytScanTreeForJsFiless c csd}xtj|d|D]\}}}x3|D]+}|r5|jdr5|j|q5q5Wxk|D]c}|r|jdrqkntjj||} |r|j|  rqkntjj| VqkWqWdS(szScans a directory tree for files. Args: root: str, Path to a root directory. path_filter: A regular expression filter. If set, only paths matching the path_filter are returned. ignore_hidden: If True, do not follow or return hidden directories or files (those starting with a '.' character). Yields: A string path to files, relative to cwd. cSs |dS(N((tos_error((sS/Users/alexmahan/git/google-earth-day/closure/library/closure/bin/build/treescan.pytOnError9stonerrort.N(tostwalkt startswithtremovetpathtjointmatchtnormpath( RRt ignore_hiddenRtdirpathtdirnamest filenamestdirnametfilenametfullpath((sS/Users/alexmahan/git/google-earth-day/closure/library/closure/bin/build/treescan.pyR+s %  ( t__doc__R tret __author__tcompileRRtNonetTrueR(((sS/Users/alexmahan/git/google-earth-day/closure/library/closure/bin/build/treescan.pyts