util: Provide AppendBackupSuffix() for further transformations

This commit is contained in:
Jöran Karl 2024-09-03 20:29:24 +02:00
parent 1663a1a6e4
commit 21b7080935

View File

@ -412,6 +412,10 @@ func GetModTime(path string) (time.Time, error) {
return info.ModTime(), nil
}
func AppendBackupSuffix(path string) string {
return path + ".micro-backup"
}
// EscapePathUrl encodes the path in URL query form
func EscapePathUrl(path string) string {
return url.QueryEscape(filepath.ToSlash(path))