Format the s3 path properly.

        Args:
            suffix (str): suffix to add on to an s3 path

        Returns:
            str: formatted path
547623
def _path_formatter(self, suffix):
        
        if suffix.lower() == "mirror":
            path_items = [self.bucket, self.s3path]
        else:
            path_items = [self.bucket, self.s3path, suffix]

        path = '/'.join(path_items)
        s3_format = "s3://{}"
        formatted_path = path.replace('//', '/')  # removes configuration errors
        full_path = s3_format.format(formatted_path)
        return full_path
1155047
private static String addSuffix(final String href, final String suffix) {
        final int idx = href.lastIndexOf(".");
        return idx != -1
                ? (href.substring(0, idx) + suffix + href.substring(idx))
                : (href + suffix);
    }
1208777
def suffix
      suffix = ENV['LONO_SUFFIX'] # highest precedence
      suffix ||= Cfn::Current.suffix
      unless suffix
        settings = Setting.new.data
        suffix ||= settings["stack_name_suffix"] # lowest precedence
      end

      return if suffix&.empty?
      suffix
    end
1218218
def _defines(prefix, defs, suffix, env, c=_concat_ixes):
    

    return c(prefix, env.subst_path(processDefines(defs)), suffix, env)
981684
def path(self):
        
        return "/".join([
            part
            for part in [
                self.version,
                self.qualifier,
            ]
            if part
        ])
695267
def addextension(path, ext=None):
    
    if ext:
        if '*' in path:
            return path
        elif os.path.splitext(path)[1]:
            return path
        else:
            if not ext.startswith('.'):
                ext = '.'+ext
            if not path.endswith(ext):
                if not path.endswith(os.path.sep):
                    path += os.path.sep
                return path + '*' + ext
            else:
                return path
    else:
        return path
551372
def keys_with_suffix(self, suffix):
        
        return [k.rstrip(suffix) for k in self.keys() if k.endswith(suffix)]
445868
def exttype(suffix):
    """"""
    def inner(s):
        if s == '':
            return s
        first, last = os.path.splitext(s)
        return first + suffix
    return inner
41347
def include_path(self):
        
        parts = [self.include_dir(root=self.url_root)]
        parts.append("index")
        return "/".join(parts)
280453
def fix_filename(filename, suffix=''):
    
    if suffix:
        f, ext = os.path.splitext(filename)
        return f+suffix+ext
    else:
        return filename
392730
def _write_raw(self, suffix):
        
        if not self.enabled: return

        self.buffer.write(CSI)
        self.buffer.write(suffix)
208480
def strip_suffix(string, suffix):
    """"""
    if string.endswith(suffix):
        return string[:-(len(suffix))]
    return string
510015
def replace_suffix(to_transform, suffix):
    
    if is_sequence(to_transform):
        transformed = []
        for f in to_transform:
            (base, _) = os.path.splitext(f)
            transformed.append(base + suffix)
        return transformed
    elif is_string(to_transform):
        (base, _) = os.path.splitext(to_transform)
        return base + suffix
    else:
        raise ValueError("replace_suffix takes a single filename as a string or "
                         "a list of filenames to transform.")
397911
def _canonize_suffix(self, suffix):
        
        if not suffix.explicit():
            edge_id = make_edge_id(suffix.source_node_id, self.string[suffix.first_char_index])
            e = self.edges[edge_id]
            if e.length <= suffix.length:
                suffix.first_char_index += e.length + 1
                suffix.source_node_id = e.dest_node_id
                self._canonize_suffix(suffix)
1316342
def with_suffix(self, suffix):
        
        obj = super(ArtifactoryPath, self).with_suffix(suffix)
        obj.auth = self.auth
        obj.verify = self.verify
        obj.cert = self.cert
        obj.session = self.session
        return obj
734881
def _label_suffix(label, suffix):
    
    if len(label) > 50:
        nhead = 25
        return ''.join([label[:nhead], '..', suffix])
    else:
        return label + suffix
265455
def basename(self, suffix=''):
		''' '''
		return os.path.basename(self._file, suffix) if self._file else None