Get the name of the resized file when assumed it exists.
175512
def _get_resized_name(image, width, height, crop, namespace):
    
    path, name = os.path.split(image.name)
    name_part = "%s/%ix%i" % (namespace, width, height)
    if crop:
        name_part += "_cropped"

    return os.path.join(path, name_part, name)
1135318
def getopenfilename(parent=None, caption='', basedir='', filters='',
                    selectedfilter='', options=None):
    """"""
    return _qfiledialog_wrapper('getOpenFileName', parent=parent,
                                caption=caption, basedir=basedir,
                                filters=filters, selectedfilter=selectedfilter,
                                options=options)
1087340
function(count, name) {
    if (count) {
      grunt.log.writeln('Resized ' + count.toString().cyan + ' ' +
      grunt.util.pluralize(count, 'file/files') + ' for ' + name);
    }
  }
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('"')
576133
def file_found(filename,force):
    """"""
    if os.path.exists(filename) and not force:
        logger.info("Found %s; skipping..."%filename)
        return True
    else:
        return False
959665
def get_filename(self, renew=False):
        
        if self._fname is None or renew:
            self._fname = '%s.%s' % (self._id, self._format)
        return self._fname
666477
protected function getResizedFilename( $filepath, $width, $height, $crop ) {
		$filename = basename( $filepath );

		// match filename extension with dot
		// only the last extension will match when there are multiple ones
		$extension_pattern = '/(\.[^\.]+)$/';

		// add width, height and crop to filename
		$replacement = '-' . $width . 'x' . $height . ( $crop ? '-cropped' : '' ) . '$1';

		return preg_replace( $extension_pattern, $replacement, $filename );
	}
950615
protected function getResizedImagePath()
    {
        $resizedImagePath = "";
        $dir = $this->getImageDir();
        $name = $this->getResizedImageName();

        if ($dir && $name) {
            $resizedImagePath = $dir . $name;
        }

        return $resizedImagePath;
    }
470430
def _get_cropped_file_names(self):
        """"""
        files = [ff.name for ff in self.files]
        prefix = commonprefix(files)
        suffix = commonprefix([f[::-1] for f in files])[::-1]
        cropped = [f[len(prefix):-len(suffix)] for f in files]
        return cropped
147788
private function getFileName()
    {
        --$this->currentFileIndex;
        do{
            ++$this->currentFileIndex;
            $fileName = $this->currentNoIndexFileName;
            if($this->currentFileIndex > 0)
            {
                $fileName .= '(' . $this->currentFileIndex . ')';
            }
            $fileName .= $this->currentFileExt;
        }while(is_file($fileName) && filesize($fileName) >= $this->maxSize);
        return $fileName;
    }
231976
def get_file_size(file_object):
    ''''''
    position = file_object.tell()

    file_object.seek(0, 2)
    file_size = file_object.tell()
    file_object.seek(position, 0)

    return file_size
1200789
def getsavefilename(parent=None, caption='', basedir='', filters='',
                    selectedfilter='', options=None):
    """"""
    return _qfiledialog_wrapper('getSaveFileName', parent=parent,
                                caption=caption, basedir=basedir,
                                filters=filters, selectedfilter=selectedfilter,
                                options=options)
1261202
def source_file(self):
        
        if self._filename is None:
            self._filename = self._as_in_memory_geotiff()._filename
        return self._filename
1245224
def getSaveFileName(self, *args, **kwargs):
        
        if 'directory' not in kwargs:
            if self.opts['save']:
                if self.opts['save']:
                    kwargs['directory'] = self.opts['save']
        fname = QtWidgets.QFileDialog.getSaveFileName(**kwargs)
        if fname:
            if type(fname) == tuple:
                #only happened since qt5
                #getSaveFileName returns (path, ftype)
                if not fname[0]:
                    return
                p = PathStr(fname[0])
                if not p.filetype():
                    ftyp = self._extractFtype(fname[1]) 
                    p = p.setFiletype(ftyp)
            else:
                p = PathStr(fname)
            self.opts['save'] = p.dirname()
            if self.opts['open'] is None:
                self.opts['open'] = self.opts['save']
            return p
212401
def filename_match(fsearch, filename, width, height):
    '''
    
    '''
    fsearch = clean_path(fsearch)
    filename = clean_path(filename)
    if fsearch == filename:
        return True

    if fsearch.find('@') == -1:
        return False
    basename, fileext = os.path.splitext(fsearch)
    nickname, extinfo = basename.split('@', 1)
    if extinfo == 'auto':
        valid_names = {}.fromkeys([
            nickname+'@{}x{}'.format(width, height)+fileext,
            nickname+'@{}x{}'.format(height, width)+fileext,
            nickname+'.{}x{}'.format(width, height)+fileext,
            nickname+'.{}x{}'.format(height, width)+fileext,
        ])
        if filename in valid_names:
            return True
    # if extinfo.find('x') != -1:
    #     cw, ch = extinfo.split('x', 1)
    #     if cw*width == ch*height or cw*height == ch*width:
    #         return True
    return False
915914
def get_filename(self, index):
        """"""
        if index:
            return osp.normpath(to_text_string(self.fsmodel.filePath(index)))
793330
function sizeForFileName(fileName, size) {
	const m = fileName.match(/@(\d+)x\./);
	const scale = m ? +m[1] : 1;

	return {
		realWidth: size.width,
		realHeight: size.height,
		width: Math.floor(size.width / scale),
		height: Math.floor(size.height / scale)
	};
}