MCPcopy Create free account
hub / github.com/AbelChe/evil_minio / encodeDirObject

Function encodeDirObject

cmd/utils.go:1019–1024  ·  view source on GitHub ↗

On MinIO a directory object is stored as a regular object with "__XLDIR__" suffix. For ex. "prefix/" is stored as "prefix__XLDIR__"

(object string)

Source from the content-addressed store, hash-verified

1017// On MinIO a directory object is stored as a regular object with "__XLDIR__" suffix.
1018// For ex. "prefix/" is stored as "prefix__XLDIR__"
1019func encodeDirObject(object string) string {
1020 if HasSuffix(object, slashSeparator) {
1021 return strings.TrimSuffix(object, slashSeparator) + globalDirSuffix
1022 }
1023 return object
1024}
1025
1026// Reverse process of encodeDirObject()
1027func decodeDirObject(object string) string {

Callers 15

GetObjectNInfoMethod · 0.85
GetObjectInfoMethod · 0.85
PutObjectMethod · 0.85
DeleteObjectMethod · 0.85
DeleteObjectsMethod · 0.85
CopyObjectMethod · 0.85
HealObjectMethod · 0.85
PutObjectMetadataMethod · 0.85
PutObjectTagsMethod · 0.85
DeleteObjectTagsMethod · 0.85
GetObjectTagsMethod · 0.85

Calls 1

HasSuffixFunction · 0.85

Tested by 1