AsStaticSymlink returns the StaticFile as a StaticSymlink if the StaticFile represents a symlink. Otherwise, it returns the zero value of StaticSymlink and false.
()
| 323 | // StaticFile represents a symlink. Otherwise, it returns the zero |
| 324 | // value of StaticSymlink and false. |
| 325 | func (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 |
no outgoing calls