MCPcopy
hub / github.com/perkeep/perkeep / AsStaticSymlink

Method AsStaticSymlink

pkg/schema/blob.go:325–331  ·  view source on GitHub ↗

AsStaticSymlink returns the StaticFile as a StaticSymlink if the StaticFile represents a symlink. Otherwise, it returns the zero value of StaticSymlink and false.

()

Source from the content-addressed store, hash-verified

323// StaticFile represents a symlink. Otherwise, it returns the zero
324// value of StaticSymlink and false.
325func (sf StaticFile) AsStaticSymlink() (s StaticSymlink, ok bool) {
326 if sf.b.ss.Type == TypeSymlink {
327 return StaticSymlink{sf}, true
328 }
329
330 return
331}
332
333// AsStaticFIFO returns the StatifFile as a StaticFIFO if the
334// StaticFile represents a fifo. Otherwise, it returns the zero value

Callers 3

fileInfoMethod · 0.80
smartFetchFunction · 0.80

Calls

no outgoing calls

Tested by 1