MCPcopy Create free account
hub / github.com/dropbox/dbxcli / validatePath

Function validatePath

cmd/root.go:152–161  ·  view source on GitHub ↗
(p string)

Source from the content-addressed store, hash-verified

150}
151
152func validatePath(p string) (path string, err error) {
153 path = p
154 if !strings.HasPrefix(path, "/") {
155 path = fmt.Sprintf("/%s", path)
156 }
157
158 path = cleanDropboxPath(path)
159
160 return
161}
162
163func makeRelocationArg(s string, d string) (arg *files.RelocationArg, err error) {
164 src, err := validatePath(s)

Callers 15

putFunction · 0.85
putStdinFunction · 0.85
mkdirFunction · 0.85
isRemoteFolderFunction · 0.85
makeRelocationArgFunction · 0.85
restoreFunction · 0.85
revsFunction · 0.85
shareLinkCreateFunction · 0.85
validateRemoveTargetsFunction · 0.85

Calls 1

cleanDropboxPathFunction · 0.85

Tested by 2

TestValidatePathFunction · 0.68