ó
ô"“Xc           @   sO   d  Z  d d l Z d d l Z d Z e j d ƒ Z d „  Z d e d „ Z	 d S(   s6   Shared utility functions for scanning directory trees.iÿÿÿÿNs   nnaze@google.com (Nathan Naze)s   ^.+\.js$c         C   s   t  |  d t ƒS(   s¤   Scans 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(   t   ScanTreet   _JS_FILE_REGEX(   t   root(    (    s»   /Users/ahocevar/projects/openlayers.github.io/.grunt/openlayers-website/repo/node_modules/closure-util/.deps/library/411062e6cc01c477c9504cf3b3e8ac4a58b92e2a/closure/bin/build/treescan.pyt   ScanTreeForJsFiles   s    	c   
      c   sÚ   d „  } xÊ t  j |  d | ƒD]³ \ } } } x3 | D]+ } | r5 | j d ƒ r5 | j | ƒ q5 q5 Wxk | D]c } | rŒ | j d ƒ rŒ qk n  t  j j | | ƒ }	 | r½ | j |	 ƒ r½ qk n  t  j j |	 ƒ Vqk Wq Wd S(   sz  Scans 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.
  c         S   s
   |  ‚ d  S(   N(    (   t   os_error(    (    s»   /Users/ahocevar/projects/openlayers.github.io/.grunt/openlayers-website/repo/node_modules/closure-util/.deps/library/411062e6cc01c477c9504cf3b3e8ac4a58b92e2a/closure/bin/build/treescan.pyt   OnError9   s    t   onerrort   .N(   t   ost   walkt
   startswitht   removet   patht   joint   matcht   normpath(
   R   R    t   ignore_hiddenR   t   dirpatht   dirnamest	   filenamest   dirnamet   filenamet   fullpath(    (    s»   /Users/ahocevar/projects/openlayers.github.io/.grunt/openlayers-website/repo/node_modules/closure-util/.deps/library/411062e6cc01c477c9504cf3b3e8ac4a58b92e2a/closure/bin/build/treescan.pyR   +   s    	%(
   t   __doc__R	   t   ret
   __author__t   compileR   R   t   Nonet   TrueR   (    (    (    s»   /Users/ahocevar/projects/openlayers.github.io/.grunt/openlayers-website/repo/node_modules/closure-util/.deps/library/411062e6cc01c477c9504cf3b3e8ac4a58b92e2a/closure/bin/build/treescan.pyt   <module>   s   	