seaweedfs/weed/filer/filer_hardlink.go

17 lines
268 B
Go
Raw Permalink Normal View History

2022-02-25 08:53:27 +00:00
package filer
import (
"github.com/seaweedfs/seaweedfs/weed/util"
2022-02-25 08:53:27 +00:00
)
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
}