Get the path of the given file within the batchup data directory

    Parameters
    ----------
    filename: str
        The filename to locate within the batchup data directory

    Returns
    -------
    str
        The full path of the file
484312
def get_data_path(filename):
    
    if os.path.isabs(filename):
        return filename
    else:
        return os.path.join(get_data_dir(), filename)
438512
def obtain_to(filename):
    
    root, _ = nc.open(filename)
    lat, lon = nc.getvar(root, 'lat')[0,:], nc.getvar(root, 'lon')[0,:]
    nc.close(root)
    return obtain(lat, lon)
619503
function _findFile(filename) {
  var cwd = process.cwd();
  var parts = cwd.split(_path2.default.sep);
  do {
    var loc = parts.join(_path2.default.sep);
    if (!loc) break;

    var file = _path2.default.join(loc, filename);
    if (_fs2.default.existsSync(file)) {
      var fileObj = undefined;
      try {
        fileObj = require(file);
      } catch (e) {
        fileObj = _loadJSON(file);
      }
      return fileObj;
    }

    parts.pop();
  } while (parts.length);

  return null;
}
706608
def rel_path(filename):
    
    return os.path.join(os.getcwd(), os.path.dirname(__file__), filename)
1104568
def file2abspath(filename, this_file=__file__):
    
    return os.path.abspath(
        os.path.join(os.path.dirname(os.path.abspath(this_file)), filename))
978124
def get_path(filename):
    
    path = abspath(filename) if os.path.isdir(filename) else dirname(abspath(filename))
    return path
1064253
def pickFilepath( self ):
        
        mode = self.filepathMode()
        
        filepath = ''
        filepaths = []
        curr_dir = nativestring(self._filepathEdit.text())
        if ( not curr_dir ):
            curr_dir = QDir.currentPath()
        
        if mode == XFilepathEdit.Mode.SaveFile:
            filepath = QFileDialog.getSaveFileName( self,
                                                    self.windowTitle(),
                                                    curr_dir,
                                                    self.filepathTypes() )
                                                    
        elif mode == XFilepathEdit.Mode.OpenFile:
            filepath = QFileDialog.getOpenFileName( self,
                                                    self.windowTitle(),
                                                    curr_dir,
                                                    self.filepathTypes() )
        
        elif mode == XFilepathEdit.Mode.OpenFiles:
            filepaths = QFileDialog.getOpenFileNames( self,
                                                      self.windowTitle(),
                                                      curr_dir,
                                                      self.filepathTypes() )
        
        else:
            filepath = QFileDialog.getExistingDirectory( self,
                                                         self.windowTitle(),
                                                         curr_dir )
        
        if filepath:
            if type(filepath) == tuple:
                filepath = filepath[0]
            self.setFilepath(nativestring(filepath))
        elif filepaths:
            self.setFilepaths(map(str, filepaths))
525565
def getFilepaths(self, filename):
        
        return (os.path.join(os.environ['HOME'], filename),
                os.path.join(self.mackup.mackup_folder, filename))
80201
def get_file_path(dotted_path, extension='json'):
    
    # If the operating system's file path seperator character is in the string
    if os.sep in dotted_path or '/' in dotted_path:
        # Assume the path is a valid file path
        return dotted_path

    parts = dotted_path.split('.')
    if parts[0] == 'chatterbot':
        parts.pop(0)
        parts[0] = DATA_DIRECTORY

    corpus_path = os.path.join(*parts)

    if os.path.exists(corpus_path + '.{}'.format(extension)):
        corpus_path += '.{}'.format(extension)

    return corpus_path
510161
def get_file(self, filename):
        
        log.debug('[%s]: reading: //%s/%s', self.name, self.name, filename)
        try:
            blob = self.repo.head.commit.tree/filename
            return blob.data_stream
        except KeyError as err:
            raise GitError(err)
1022382
def get_filename(file):
    
    if not os.path.exists(file):
        return None
    return "%s%s" % os.path.splitext(file)
769205
def _read_name_file(self, filename):
        
        file_path = os.path.join(self._DATA_DIR, filename)
        with open(file_path) as f:
            names = json.load(f)

        return names
225899
private Path getPath(String fileName)
      throws IOException, URISyntaxException {
    Path path;
    URL url = getClass().getClassLoader().getResource(fileName);
    if (url == null) {
      throw new IOException(String.format("File %s is not existing", fileName));
    }
    URI uri = url.toURI();
    Map<String, String> env = new HashMap<>();
    if (uri.toString().contains("!")) {
      String[] parts = uri.toString().split("!");
      if (fs == null) {
        fs = FileSystems.newFileSystem(URI.create(parts[0]), env);
      }
      path = fs.getPath(parts[1]);
    } else {
      path = Paths.get(uri);
    }
    return path;
  }
26713
def _input_as_path(self, data):
        
        self._input_filename = self.getTmpFilename(
            self.WorkingDir, suffix='.fasta')
        copyfile(data, self._input_filename)
        return self._input_filename
441663
def get_text_path(self):
        
        for res in self.dsDoc['dataResources']:
            resPath = res['resPath']
            resType = res['resType']
            isCollection = res['isCollection']
            if resType == 'text' and isCollection:
                return os.path.join(self.dsHome, resPath)

        # if the for loop is over and no image directory is found, then return None
        raise RuntimeError('could not find learningData file the dataset')
398003
def get_restore_path(filename):
    
    path = os.path.join(RESTORE_DIRECTORY, FILE_STORE_LOCATION)
    if not os.path.exists(path):
        os.makedirs(path)
    return os.path.join(path, filename + '.pickle')
835706
def get_fullpath(self, fullname=None, relative_to=None):
        
        # if is an empty path
        if not fullname:
            return fullname

        isabs = os.path.isabs(fullname)

        path, name = os.path.split(fullname)

        if not name:  # path to a folder
            return None
        else:  # path to a file
            if isabs:
                return fullname
            else:
                return os.path.join(self.case_path, path, name)