MCPcopy
hub / github.com/rclone/rclone / transformDir

Function transformDir

lib/transform/transform.go:114–120  ·  view source on GitHub ↗

transform all but the last path segment

(s string, t transform)

Source from the content-addressed store, hash-verified

112
113// transform all but the last path segment
114func transformDir(s string, t transform) (string, error) {
115 dirPath, err := transformPath(path.Dir(s), t, false)
116 if err != nil {
117 return "", err
118 }
119 return path.Join(dirPath, path.Base(s)), nil
120}
121
122// transformPathSegment transforms one path segment (or really any string) according to the chosen TransformAlgo.
123// It assumes path separators have already been trimmed.

Callers 1

PathFunction · 0.85

Calls 4

transformPathFunction · 0.85
DirMethod · 0.80
JoinMethod · 0.80
BaseMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…