Args:
            *paths (str | unicode): Paths to files to add as static DictProvider-s, only existing files are added
323076
def use_json(self, *paths):
        
        for path in paths:
            if path:
                fpath = os.path.expanduser(path)
                if os.path.exists(fpath):
                    with open(fpath) as fh:
                        provider = DictProvider(json.load(fh), name=path)
                        self.add(provider)
204005
def cache_files(self, paths, saltenv='base', cachedir=None):
        '''
        
        '''
        ret = []
        if isinstance(paths, six.string_types):
            paths = paths.split(',')
        for path in paths:
            ret.append(self.cache_file(path, saltenv, cachedir=cachedir))
        return ret
1092671
def _update_python_paths(self):
        
        for path in self._config['workflows'] + self._config['libraries']:
            if os.path.isdir(os.path.abspath(path)):
                if path not in sys.path:
                    sys.path.append(path)
            else:
                raise ConfigLoadError(
                    'Workflow directory {} does not exist'.format(path))
281167
def files_exist(self, file_paths):
    
    results = {}

    def exist_thunk(paths, interface):
      results.update(interface.files_exist(paths))

    if len(self._threads):
      for block in scatter(file_paths, len(self._threads)):
        self.put(partial(exist_thunk, block))
    else:
      exist_thunk(file_paths, self._interface)

    desc = 'Existence Testing' if self.progress else None
    self.wait(desc)

    return results
1125311
def add_pythonpath(path):
    
    # Get PYTHONPATH value. Default is empty string.
    pythonpath = os.environ.setdefault('PYTHONPATH', '')

    # If given path is not in PYTHONPATH
    if path not in pythonpath.split(os.pathsep):
        # Prepend given path to PYTHONPATH
        pythonpath = os.environ['PYTHONPATH'] = \
            (path + os.pathsep + pythonpath) if pythonpath else path

    # Return new PYTHONPATH value
    return pythonpath
1354536
def add_path(self, path):
        """"""
        if not os.path.exists(path):
            raise RuntimeError('Path does not exists: %s.' % path)
        self.paths.append(path)
892914
def add path, kwargs={}
      remove_files = kwargs.arg :remove_files, false

      cmd = 'aptly repo add'
      cmd += ' -remove-files' if remove_files
      cmd += " #{@name.quote} #{path}"

      Aptly::runcmd cmd
    end
1099622
def expand_source_paths(paths):
    
    for src_path in paths:
        # only track the source path if we can find it to avoid double-reloads
        # when the source and the compiled path change because on some
        # platforms they are not changed at the same time
        if src_path.endswith(('.pyc', '.pyo')):
            py_path = get_py_path(src_path)
            if os.path.exists(py_path):
                src_path = py_path
        yield src_path
601974
def extract_paths(self, paths, *args, **kwargs):
        
        return self.provider.extract_paths(paths, *args, **kwargs)
1143655
def expand_path(path):
    """"""

    paths = []
    path = os.path.expanduser(path)
    path = os.path.expandvars(path)

    if os.path.isdir(path):

        for (dir, dirs, files) in os.walk(path):
            for file in files:
                paths.append(os.path.join(dir, file))
    else:
        paths.extend(glob(path))

    return paths
791003
def include_path(self, path):
        
        self.seen_paths.add(path)
        return self.filter.include(path)
211457
def add_abs_path_directories(opts_dict):
    
    assert_has_input_output(opts_dict)
    opts_dict['abs_input'] = path.abspath(opts_dict['input'])
    if opts_dict['is_dir']:
        # Only add path separator to input if it is a directory
        opts_dict['abs_input'] += get_path_separator()
    opts_dict['abs_output'] = path.abspath(opts_dict['output']) + \
        get_path_separator()
119024
def paths(self, value):
        

        if value is not None:
            assert type(value) in (tuple, list), "'{0}' attribute: '{1}' type is not 'tuple' or 'list'!".format(
                "paths", value)
            for path in value:
                assert type(path) is unicode, "'{0}' attribute: '{1}' type is not 'unicode'!".format(
                    "paths", path)
                assert os.path.exists(path), "'{0}' attribute: '{1}' directory doesn't exists!".format("paths", path)
        self.__paths = value
206954
def add_path(self, path, path_filter=None):
        
        for root, _, files in os.walk(path):
            for filename in files:
                full_path_and_filename = os.path.join(root, filename)
                if path_filter is None or path_filter(full_path_and_filename):
                    relative_path_and_filename = full_path_and_filename.replace(path + '/', '')
                    with open(full_path_and_filename, 'rb') as handle:
                        self.files[relative_path_and_filename] = b64encode(handle.read()).decode('utf-8')
1232513
def _add_def_paths(self, prop_dict):
    
    for prop_key, prop_value in prop_dict.iteritems():
      if prop_key == '$ref' and not 'prop_value'.startswith('#'):
        prop_dict[prop_key] = '#/definitions/' + prop_dict[prop_key]
      elif isinstance(prop_value, dict):
        self._add_def_paths(prop_value)
62600
def add_to_path(p):
    '''
        
    '''
    old_path = sys.path
    if p not in sys.path:
        sys.path = sys.path[:]
        sys.path.insert(0, p)
    try:
        yield
    finally:
        sys.path = old_path
334804
def __update_paths(self, settings):
        
        if not isinstance(settings, dict):
            return

        if 'custom_base_path' in settings:
            base_path = settings['custom_base_path']
            base_path = join(dirname(__file__), base_path)
            self.__load_paths(base_path)