Add suffix to a full file name
437188
def add_suffix(fullname, suffix):
    
    name, ext = os.path.splitext(fullname)
    return name + '_' + suffix + ext
265455
def basename(self, suffix=''):
		''' '''
		return os.path.basename(self._file, suffix) if self._file else None
287917
def addFilename( self, filename ):
        
        filename = os.path.normpath(nativestring(filename))
        
        if filename in self._filenames:
            self._filenames.remove(filename)
        
        self._filenames.insert(0, filename)
        self._filenames = self._filenames[:self.maximumLength()]
        
        self.refresh()
42043
def extend_name(suffix):
    

    def dec(cls):
        name = '{}{}'.format(cls.__name__, suffix)
        setattr(cls, '__name__', name)
        return cls

    return dec
1009028
function addAllMatchingCompressionsToFile(fileName, fullFilePath) {
        for (var i = 0; i < compressions.length; i++) {
            if (fileName.endsWith(compressions[i].fileExtension)) {
                addCompressionToFile(fullFilePath, compressions[i]);
                return;
            }
        }
    }
951328
def finish(self):
        """"""

        # Combine all the suffix files into the data file.
        self.cov.stop()
        self.cov.combine()
        self.cov.save()
109023
def add_suffix(in_files, suffix):
    
    import os.path as op
    from nipype.utils.filemanip import fname_presuffix, filename_to_list
    return op.basename(fname_presuffix(filename_to_list(in_files)[0],
                                       suffix=suffix))
280453
def fix_filename(filename, suffix=''):
    
    if suffix:
        f, ext = os.path.splitext(filename)
        return f+suffix+ext
    else:
        return filename
1267644
def __ensure_suffix(t, suffix):
    
    tpath = str(t)
    if not tpath.endswith(suffix):
        return tpath+suffix
    
    return t
582122
def disttar_suffix(env, sources):
        """"""

        env_dict = env.Dictionary()
        if env_dict.has_key("DISTTAR_FORMAT") and env_dict["DISTTAR_FORMAT"] in ["gz", "bz2"]:
                return ".tar." + env_dict["DISTTAR_FORMAT"]
        else:
                return ".tar"
1040213
def chunk_suffixes
      chunks.map { |chunk| File.extname(chunk).split("-").last }.sort
    end
94110
def filename(out_dir, name, undefine=False):
    """"""
    if undefine:
        prefix = 'undef_'
    else:
        prefix = ''
    return os.path.join(out_dir, '{0}{1}.hpp'.format(prefix, name.lower()))
455338
def add_url_suffix(url):
    """"""
    url = url.rstrip('/')
    if not has_suffix(url):
        return '{0}.com'.format(url)
    return url
186088
def files_with_exts(root='.', suffix=''):
    
    return (os.path.join(rootdir, filename)
            for rootdir, dirnames, filenames in os.walk(root)
            for filename in filenames
            if filename.endswith(suffix))
1282895
def full_filename(for_file)
      parent_name = super(for_file)
      extension = File.extname(parent_name)
      base_name = parent_name.chomp(extension)
      base_name = base_name[version_name.size.succ..-1] if version_name
      [base_name, version_name].compact.join('-') + extension
    end
1148826
private static function suffixName(string $name, string $suffix)
    {
        return \substr($name, -\strlen($suffix)) === $suffix ? $name : \sprintf('%s%s', $name, $suffix);
    }
394696
public static function getNewFileName($fileName, $prefix, $suffix)
    {
        $effect = $fileName;

        if (!empty($fileName) && (!empty($prefix) || !empty($suffix))) {
            $name = self::getFileNameWithoutExtension($fileName);
            $extension = self::getFileExtension($fileName);

            $effect = sprintf('%s%s%s.%s', $prefix, $name, $suffix, $extension);
        }

        return $effect;
    }