add .bin to PATH
356916
function getPathVariableName() {
    // windows calls it's path 'Path' usually, but this is not guaranteed.
    if (process.platform === 'win32') {
        for (const key of Object.keys(process.env))
            if (key.match(/^PATH$/i))
                return key;
        return 'Path';
    }
    return "PATH";
}
1097332
def mkdir(path, recursive=True, **kwargs):
    """"""
    import os
    if recursive:
        os.makedirs(path, **kwargs)
    else:
        os.mkdir(path, **kwargs)
419612
def mkdir(self, path):
        
        if not os.path.exists(path):
            os.makedirs(path)
93156
def add_to_stage(self, paths):
        
        cmd = self._command.add(paths)

        (code, stdout, stderr) = self._exec(cmd)

        if code:
            raise errors.VCSError('Can\'t add paths to VCS. Process exited with code %d and message: %s' % (
                code, stderr + stdout))
569959
def add_path_to_sys_path(self):
        """"""
        for path in reversed(self.get_spyder_pythonpath()):
            sys.path.insert(1, path)
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"])
31803
def add_path(searchpath, encoding='utf-8', followlinks=False):
    """"""
    if not _has_jinja:
        raise RuntimeError(_except_text)
    _jload.add_loader(FileSystemLoader(searchpath, encoding, followlinks))
951273
def __ensure_directory_in_path(filename: Path) -> None:
    
    directory = Path(filename).parent.resolve()
    if directory not in sys.path:
        logger.debug(f"Adding {directory} to sys.path")
        sys.path.insert(0, str(directory))
927468
def add(path=None, force=False, quiet=False):
    
    option = '-f' if force else ''
    return run('add %s %s' % (option, path) or '.', quiet=quiet)
724187
def binwrite(path, data)
      File.open(path, 'wb') do |file|
        file.write(data)
      end
    end
605279
def mkdir_and_cd(dirname):
    """"""
    if not os.path.exists(dirname):
        os.makedirs(dirname)
        os.chdir(dirname)
    else:
        os.chdir(dirname)
473183
def _add_current_codedir(self, path):
        
        dirpath = self.tramp.dirname(path)
        if dirpath not in self.basepaths:
            self.basepaths.append(dirpath)
            self.rescan()
624946
def add(self, path):
        """"""
        
        # sys.path always has absolute paths.
        path = os.path.abspath(path)
        
        # It must exist.
        if not os.path.exists(path):
            return
        
        # It must not already be in sys.path.
        if path in sys.path:
            return

        if self.index is not None:
            sys.path.insert(self.index, path)
            self.index += 1
        else:
            sys.path.append(path)
1118602
def from_disk_add_path(self, path=None, resource_list=None):
        """"""
        # sanity
        if (path is None or resource_list is None or self.mapper is None):
            raise ValueError("Must specify path, resource_list and mapper")
        # is path a directory or a file? for each file: create Resource object,
        # add, increment counter
        if (sys.version_info < (3, 0)):
            path = path.decode('utf-8')
        if os.path.isdir(path):
            num_files = 0
            for dirpath, dirs, files in os.walk(path, topdown=True):
                for file_in_dirpath in files:
                    num_files += 1
                    if (num_files % 50000 == 0):
                        self.logger.info(
                            "ResourceListBuilder.from_disk_add_path: %d files..." % (num_files))
                    self.add_file(resource_list=resource_list,
                                  dir=dirpath, file=file_in_dirpath)
                    # prune list of dirs based on self.exclude_dirs
                    for exclude in self.exclude_dirs:
                        if exclude in dirs:
                            self.logger.debug("Excluding dir %s" % (exclude))
                            dirs.remove(exclude)
        else:
            # single file
            self.add_file(resource_list=resource_list, file=path)
227613
def extend_path():
    
    if ROOT not in sys.path:
        sys.path.insert(0, ROOT)

    if LIB not in sys.path:
        sys.path.insert(0, LIB)
535872
def setup_path():
    """"""
    import os.path; import sys

    if sys.argv[0]:
        top_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
        sys.path = [os.path.join(top_dir, "src")] + sys.path
        pass
    return
998096
def touch(path):
        
        parentDirPath = os.path.dirname(path)

        PathOperations.safeMakeDirs(parentDirPath)

        with open(path, "wb"):
            pass