Return filename from index
19498
def get_filename(self, index):
        """"""
        if index:
            path = self.fsmodel.filePath(self.proxymodel.mapToSource(index))
            return osp.normpath(to_text_string(path))
710864
def get_filename(disposition):
    
    if disposition:
        params = [param.strip() for param in disposition.split(';')[1:]]
        for param in params:
            if '=' in param:
                name, value = param.split('=', 1)
                if name == 'filename':
                    return value.strip('"')
1145141
def fileInfo(self, index):
        
        return self._fs_model_source.fileInfo(
            self._fs_model_proxy.mapToSource(index))
368051
function byName(a, b) {
  if (a === INDEX_FILE) {
    return a === b ? 0 : -1;
  }
  if (b === INDEX_FILE) {
    return 1;
  }
  return a.toLowerCase().localeCompare(b.toLowerCase());
}
953900
def get_file(self, index, doc_type, id=None):
        
        data = self.get(index, doc_type, id)
        return data['_name'], base64.standard_b64decode(data['content'])
1161526
def load_filename(self, filename, index=None):
        
        filename = str(filename)  # QString protection
        if index is None:
            index = self._get_tab_index()
        page = self.pages[index]

        # Maybe this is set on purpose before loading attempt to leave new load_dir set (?)
        self.load_dir, _ = os.path.split(filename)

        clss = page.clss_load
        if len(clss) == 1:
            # If there is only one class to handle the file, will load it in a way that eventual
            # load errors will raise
            f = clss[0]()
            f.load(filename)
        else:
            # At the moment, the multi-class alternative will not display particular error information
            # if the file does not load
            f = f311.load_with_classes(filename, page.clss_load)
            if f is None:
                raise RuntimeError("Could not load '{0!s}'".format(filename))

        self.load(f, index)
189888
def funname(file):
    """"""
    if isinstance(file, str):
        files = [file]
    else:
        files = file
    bases = [os.path.basename(f) for f in files]
    names = [os.path.splitext(b)[0] for b in bases]
    if isinstance(file, str):
        return names[0]
    else:
        return names
333068
def _getFileNumber(self, filename):
        
        cur = self._connection.cursor()
        cur.execute('SELECT id FROM files WHERE name = ?', (filename,))
        row = cur.fetchone()
        if row is None:
            return None
        else:
            return row[0]
398330
def _get_file_from_url(url):
        """"""
        path = urlparse(url).path
        if not path:
            raise ValueError("Could not extract path from URL '{0}'".format(url))
        name = os.path.basename(path)
        if not name:
            raise ValueError("Could not extract file name from path '{0}'".format(path))
        return name
348304
private int retrieveIndexValueFromFileName(String fileName) {
        int index = 0;
        if (fileName != null && !fileName.trim().isEmpty()) {
            index = Integer.parseInt(fileName.substring(fileName.lastIndexOf('-') + 1,
                    fileName.length() - EXTENSION.length()));
        }
        return index;
    }
1024632
function getFullFilename(filename) {
  if (p.isAbsolute(filename)) {
    return filename
  }
  return p.join(process.cwd(), filename)
}
1331241
def get_dirname(self, index):
        """"""
        fname = self.get_filename(index)
        if fname:
            if osp.isdir(fname):
                return fname
            else:
                return osp.dirname(fname)
527182
private String getSuffix(String fileName) {

        int index = fileName.lastIndexOf(".");
        if (index > 0) {
            return fileName.substring(index);
        } else {
            return fileName;
        }
    }
930486
def filename(self, prefix='', suffix='', extension='.py'):
        """"""
        return BASE_NAME.format(prefix, self.num, suffix, extension)
701955
def load_from_filename(self, file_name, sep='\n'):
        """"""
        fp = open(file_name, 'rb')
        n = self.load_from_file(fp, sep)
        fp.close()
        return n
323282
def __filename(self, id):
        """"""
        suffix = self.fnsuffix()
        filename = "%s-%s.%s" % (self.fnprefix, id, suffix)
        return os.path.join(self.location, filename)
1339446
def get_by_index(self, index):
        """"""

        try:
            return self[index]
        except KeyError:
            for v in self.get_volumes():
                if v.index == str(index):
                    return v
        raise KeyError(index)