1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-06-01 16:22:43 +02:00
seaweedfs/weed/filer/filer_hardlink.go
2022-02-25 00:53:27 -08:00

17 lines
268 B
Go

package filer
import (
"github.com/chrislusf/seaweedfs/weed/util"
)
const (
HARD_LINK_MARKER = '\x01'
)
type HardLinkId []byte // 16 bytes + 1 marker byte
func NewHardLinkId() HardLinkId {
bytes := append(util.RandomBytes(16), HARD_LINK_MARKER)
return bytes
}