MCPcopy
hub / github.com/rclone/rclone / split

Method split

backend/s3/s3.go:1322–1328  ·  view source on GitHub ↗

split returns bucket and bucketPath from the rootRelativePath relative to f.root

(rootRelativePath string)

Source from the content-addressed store, hash-verified

1320// split returns bucket and bucketPath from the rootRelativePath
1321// relative to f.root
1322func (f *Fs) split(rootRelativePath string) (bucketName, bucketPath string) {
1323 bucketName, bucketPath = bucket.Split(bucket.Join(f.root, rootRelativePath))
1324 if f.opt.DirectoryMarkers && strings.HasSuffix(bucketPath, "//") {
1325 bucketPath = bucketPath[:len(bucketPath)-1]
1326 }
1327 return f.opt.Enc.FromStandardName(bucketName), f.opt.Enc.FromStandardPath(bucketPath)
1328}
1329
1330// split returns bucket and bucketPath from the object
1331func (o *Object) split() (bucket, bucketPath string) {

Callers 13

getMetaDataListingMethod · 0.95
ListPMethod · 0.95
ListRMethod · 0.95
createDirectoryMarkerMethod · 0.95
MkdirMethod · 0.95
RmdirMethod · 0.95
CopyMethod · 0.95
PublicLinkMethod · 0.95
restoreStatusMethod · 0.95
purgeMethod · 0.95
splitMethod · 0.45

Calls 4

SplitFunction · 0.92
JoinFunction · 0.92
FromStandardNameMethod · 0.65
FromStandardPathMethod · 0.65

Tested by

no test coverage detected