storj.io/uplink@v1.13.0/private/metaclient/paths.go (about) 1 // Copyright (C) 2019 Storj Labs, Inc. 2 // See LICENSE for copying information. 3 4 package metaclient 5 6 // TODO: known issue: 7 // this is incorrect since there's no good way to get such a path 8 // since the exact previous key is 9 // append(previousPrefix(cursor), infinite(0xFF)...) 10 11 // TODO commented until we will decide if we will support direction for objects listing 12 // func keyBefore(cursor string) string { 13 // if cursor == "" { 14 // return "" 15 // } 16 17 // before := []byte(cursor) 18 // if before[len(before)-1] == 0 { 19 // return string(before[:len(before)-1]) 20 // } 21 // before[len(before)-1]-- 22 23 // before = append(before, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f) 24 // return string(before) 25 // } 26 27 // func keyAfter(cursor string) string { 28 // return cursor + "\x00" 29 // }