filer_hardlink.go 268 B

12345678910111213141516
  1. package filer
  2. import (
  3. "github.com/seaweedfs/seaweedfs/weed/util"
  4. )
  5. const (
  6. HARD_LINK_MARKER = '\x01'
  7. )
  8. type HardLinkId []byte // 16 bytes + 1 marker byte
  9. func NewHardLinkId() HardLinkId {
  10. bytes := append(util.RandomBytes(16), HARD_LINK_MARKER)
  11. return bytes
  12. }