On MinIO a directory object is stored as a regular object with "__XLDIR__" suffix. For ex. "prefix/" is stored as "prefix__XLDIR__"
(object string)
| 1017 | // On MinIO a directory object is stored as a regular object with "__XLDIR__" suffix. |
| 1018 | // For ex. "prefix/" is stored as "prefix__XLDIR__" |
| 1019 | func 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() |
| 1027 | func decodeDirObject(object string) string { |