(dir_path, exp=None)
return ret
Get all file paths recursively within the given path.

  This optionally will filter the output using the given regex.

  Args:
    dir_path: The string path to search.
    exp: A regex to match, can be None.

  Returns:
    An array of absolute paths to all the files.
Get all file paths recursively within the given path.
Get all file paths recursively within the given path .
def get_all_files(dir_path, exp=None):
  """Get all file paths recursively within the given path.

  This optionally will filter the output using the given regex.

  Args:
    dir_path: The string path to search.
    exp: A regex to match, can be None.

  Returns:
    An array of absolute paths to all the files.
  """
  ret = []
  for root, _, files in os.walk(dir_path):
    for f in files:
      if not exp or exp.match(f):
        ret.append(os.path.join(root, f))
  ret.sort()
  return ret
def get_all_files ( dir_path , exp = None ) : ret = [ ] for root , _ , files in os . walk ( dir_path ) : for f in files : if not exp or exp . match ( f ) : ret . append ( os . path . join ( root , f ) ) ret . sort ( ) return ret