MCPcopy
hub / github.com/rclone/rclone / SuffixKeepExtension

Function SuffixKeepExtension

lib/transform/transform.go:244–247  ·  view source on GitHub ↗

SuffixKeepExtension adds a suffix while keeping extension i.e. file.txt becomes file_somesuffix.txt not file.txt_somesuffix

(remote string, suffix string)

Source from the content-addressed store, hash-verified

242//
243// i.e. file.txt becomes file_somesuffix.txt not file.txt_somesuffix
244func SuffixKeepExtension(remote string, suffix string) string {
245 base, exts := splitExtension(remote)
246 return base + suffix + exts
247}
248
249func splitExtension(remote string) (base, exts string) {
250 base = remote

Callers 3

SuffixNameFunction · 0.92
SuffixNameFunction · 0.92
transformPathSegmentFunction · 0.85

Calls 1

splitExtensionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…