Get the original filename of this content. Implies follow
17998
def get_oldest_filename(self):
        '''
        
        '''
        commit_and_name_iter = self.git.get_commits_and_names_iter(
            self.content.source_path)
        _commit, name = next(commit_and_name_iter)
        return name
1216410
def _compute_filename(self, request: BaseRequest):
        ''''''
        path = self._path_namer.get_filename(request.url_info)

        if os.path.isdir(path):
            path += '.f'
        else:
            dir_name, name = os.path.split(path)
            path = os.path.join(anti_clobber_dir_path(dir_name), name)

        return path
74412
def filename(value):
        '''
        
        '''
        return re.sub('[^a-zA-Z0-9.-_ ]', '', os.path.basename(InputSanitizer.trim(value)))
262986
def filename(self) -> str:
        
        if self._new_path is not None and str(self._new_path) != "/dev/null":
            path = self._new_path
        else:
            path = self._old_path

        return path.name
942417
def filename_from_url(url, path=None):
    
    r = requests.get(url, stream=True)
    if 'Content-Disposition' in r.headers:
        filename = re.findall(r'filename=([^;]+)',
                              r.headers['Content-Disposition'])[0].strip('"\"')
    else:
        filename = os.path.basename(urllib.parse.urlparse(url).path)
    return filename
148108
private String getFileNameFromDisposition() {
		String fileName = null;
		final String desposition = header(Header.CONTENT_DISPOSITION);
		if (StrUtil.isNotBlank(desposition)) {
			fileName = ReUtil.get("filename=\"(.*?)\"", desposition, 1);
			if (StrUtil.isBlank(fileName)) {
				fileName = StrUtil.subAfter(desposition, "filename=", true);
			}
		}
		return fileName;
	}
1269483
def get_untitled_file_name(self):
        

        name = "{0} {1}.{2}".format(
            self.__default_file_name, Editor._Editor__untitled_name_id, self.default_file_extension)
        Editor._Editor__untitled_name_id += 1
        LOGGER.debug("> Next untitled file name: '{0}'.".format(name))
        return name
1063114
def get_filename(page, content_type, data):
    
    avoid_collision = uuid.uuid4().hex[:8]

    name_parts = data.name.split('.')
    if len(name_parts) > 1:
        name = slugify('.'.join(name_parts[:-1]), allow_unicode=True)
        ext = slugify(name_parts[-1])
        name = name + '.' + ext
    else:
        name = slugify(data.name)
    filename = os.path.join(
        settings.PAGE_UPLOAD_ROOT,
        'page_' + str(page.id),
        content_type + '-' + avoid_collision + '-' + name
    )
    return filename
1174817
def filename(self):
        """"""
        if os.path.splitext(self.destination)[1]:
            # If the filename has been given make use of it
            target_file = self.destination
        else:
            # Otherwise determine it from the url.
            parsed_url = urlparse(self.url)
            source_filename = (parsed_url.path.rpartition('/')[-1] or
                               parsed_url.hostname)
            target_file = os.path.join(self.destination, source_filename)

        return os.path.abspath(target_file)
222352
private String getFileText() {

        if (m_orderedFilenamesToUpload.size() > 1) {
            return Messages.get().key(Messages.GUI_UPLOAD_FILES_PLURAL_0);
        } else {
            return Messages.get().key(Messages.GUI_UPLOAD_FILES_SINGULAR_0);
        }
    }
1024632
function getFullFilename(filename) {
  if (p.isAbsolute(filename)) {
    return filename
  }
  return p.join(process.cwd(), filename)
}
206158
def filenameToModname(self, filename):
        """"""
        for ext in reversed(self._exts):
            if filename.endswith(ext):
                filename = filename[:-len(ext)]
                break
        else:
            self.warn(filename, '%s: unknown file name extension', filename)
        filename = os.path.abspath(filename)
        elements = filename.split(os.path.sep)
        modname = []
        while elements:
            modname.append(elements[-1])
            del elements[-1]
            if not os.path.exists(os.path.sep.join(elements + ['__init__.py'])):
                break
        modname.reverse()
        modname = ".".join(modname)
        return modname
322098
def _file_name(fname, base_dir):
        

        fname = fname.replace("\\", "\\\\")

        if base_dir != '' and fname[0] != ':' and not os.path.isabs(fname):
            fname = os.path.join(base_dir, fname)

        return fname
270480
def get_filename(self, t):
		
		root, ext = os.path.splitext(self.base_filename)
		# remove seconds not significant to the period
		if self._period_seconds:
			t -= t % self._period_seconds
		# convert it to a datetime object for formatting
		dt = datetime.datetime.utcfromtimestamp(t)
		# append the datestring to the filename
		# workaround for datetime.strftime not handling '' properly
		appended_date = (
			dt.strftime(self._date_format)
			if self._date_format != '' else ''
		)
		if appended_date:
			# in the future, it would be nice for this format
			#  to be supplied as a parameter.
			result = root + ' ' + appended_date + ext
		else:
			result = self.base_filename
		return result
254126
def basename attachment, style_name
      attachment.original_filename.gsub(/#{File.extname(attachment.original_filename)}$/, "")
    end
510249
function getNewFilename(list, name) {
  if (list.indexOf(name) === -1) {
    return name;
  }
  const parsed = parseFilename(name);
  const base = parsed.base;
  const ext = parsed.ext;
  if (!base) {
    const newName = getNextNumberName(ext);
    return getNewFilename(list, newName);
  } else {
    const basename = getNextNumberName(base);
    return getNewFilename(list, `${basename}${ext}`);
  }
}
41817
def _get_filename_from_url(url):
    
    parse = urlparse(url)
    return os.path.basename(parse.path)