Adds the specified path to the list of links created by dvc. This
        list is later used on `dvc checkout` to cleanup old links.

        Args:
            path_info (dict): path info to add to the list of links.
515449
def save_link(self, path_info):
        
        assert path_info["scheme"] == "local"
        path = path_info["path"]

        if not os.path.exists(path):
            return

        mtime, _ = get_mtime_and_size(path)
        inode = get_inode(path)
        relpath = os.path.relpath(path, self.root_dir)

        cmd = (
            "REPLACE INTO {}(path, inode, mtime) "
            'VALUES ("{}", {}, "{}")'.format(
                self.LINK_STATE_TABLE, relpath, self._to_sqlite(inode), mtime
            )
        )
        self._execute(cmd)
563610
def makelink(self, tarinfo, targetpath):
        
        try:
            # For systems that support symbolic and hard links.
            if tarinfo.issym():
                os.symlink(tarinfo.linkname, targetpath)
            else:
                # See extract().
                if os.path.exists(tarinfo._link_target):
                    os.link(tarinfo._link_target, targetpath)
                else:
                    self._extract_member(self._find_link_target(tarinfo),
                                         targetpath)
        except symlink_exception:
            if tarinfo.issym():
                linkpath = os.path.join(os.path.dirname(tarinfo.name),
                                        tarinfo.linkname)
            else:
                linkpath = tarinfo.linkname
        else:
            try:
                self._extract_member(self._find_link_target(tarinfo),
                                     targetpath)
            except KeyError:
                raise ExtractError("unable to resolve link inside archive")
850563
def add_link l
            l.door = @iotas[l.src]
            raise Edoors::Exception.new "Link source #{l.src} does not exist in #{path}" if l.door.nil?
            (@links[l.src] ||= [])<< l
        end
411491
def add(self, method, path_settings, target):
        
        self.routes.append(Route(method, path_settings, target))
        return
31212
def add_info (self, s):
        
        if s not in self.info:
            self.info.append(s)
332725
def add_to_path(query):
	
	new_entry = support.get_path(query)
	if(new_entry):
		print 'Adding '+new_entry+' to PATH variable.'
		print '''1 : confirm
		2 : cancel
		'''
		choice = int(raw_input('>> '))
		if(choice == 1):
			home_dir = os.path.expanduser('~')
			bashrc = open(os.path.join(home_dir, ".bashrc"), "a")
			bashrc.write('\n\nexport PATH=\"'+new_entry+':$PATH\"\n')
			bashrc.close()
			os.system('source '+os.path.join(os.path.expanduser('~'),'.bashrc'))
			print 'Success!!'
			print os.system('echo $PATH')
	else:
		print 'We were unable to extract the \'path\' from your query.'
1055936
def add_directory(self, path, ignore=None):
        
        for root, dirs, files in os.walk(path):
            arc_prefix = os.path.relpath(root, os.path.dirname(path))
            # py3 remove pyc cache dirs.
            if '__pycache__' in dirs:
                dirs.remove('__pycache__')
            for f in files:
                dest_path = os.path.join(arc_prefix, f)

                # ignore specific files
                if ignore and ignore(dest_path):
                    continue

                if f.endswith('.pyc') or f.endswith('.c'):
                    continue
                f_path = os.path.join(root, f)

                self.add_file(f_path, dest_path)
560462
def chmod_plus(path, add_bits=stat.S_IWUSR):
    
    try:
        os.chmod(path, stat.S_IMODE(os.stat(path).st_mode) | add_bits)
    except OSError:  # pragma: nocover
        pass
988197
def add_svc_avail_path(path):
    '''
    
    '''
    if os.path.exists(path):
        if path not in AVAIL_SVR_DIRS:
            AVAIL_SVR_DIRS.append(path)
        return True
    return False
506597
def _add_path(dir_name, payload_info_list):
    """"""
    for payload_info_dict in payload_info_list:
        file_name = payload_info_dict['filename'] or payload_info_dict['pid']
        payload_info_dict['path'] = d1_common.utils.filesystem.gen_safe_path(
            dir_name, 'data', file_name
        )
795706
def append(self, path, data, **kwargs):
        
        metadata_response = self._post(
            path, 'APPEND', expected_status=httplib.TEMPORARY_REDIRECT, **kwargs)
        data_response = self._requests_session.post(
            metadata_response.headers['location'], data=data, **self._requests_kwargs)
        _check_response(data_response)
        assert not data_response.content
1004957
def _append_path(new_path):  # type: (str) -> None
    
    for path in sys.path:
        path = os.path.abspath(path)
        if new_path == path:
            return
    sys.path.append(new_path)
838230
def addPathVariables(self, pathvars):
        
        if type(pathvars) is dict:
            self._pathvars = merge(self._pathvars, pathvars)
420915
def add_handler(self, path, handler):
        
        self.signatures[path] = self.get_path_signature(path)
        self.handlers[path] = handler
507743
private void addPaths(Path p) {

        for (String d : p.list()) {
            File dir = new File(d);
            if (dir.exists() && dir.isDirectory()) {
                if (!includeDirectories.contains(dir))
                    includeDirectories.add(dir);
            }
        }
    }
829023
def add_to_path(p):
    """"""
    if p not in os.environ["PATH"]:
        os.environ["PATH"] = "{0}{1}{2}".format(p, os.pathsep, os.environ["PATH"])
972690
def addpath(path):
    """"""
    import sys
    if not exists(path):
        raise ValueError('Path %s does not exist' % path)
    sys.path.insert(1, path)