src.elv.sh@v0.21.0-dev.0.20240515223629-06979efb9a2a/pkg/cli/lscolors/stat_solaris.go (about)

     1  package lscolors
     2  
     3  import (
     4  	"os"
     5  	"syscall"
     6  )
     7  
     8  // Taken from Illumos header file.
     9  const sIFDOOR = 0xD000
    10  
    11  func isDoor(info os.FileInfo) bool {
    12  	return info.Sys().(*syscall.Stat_t).Mode&sIFDOOR == sIFDOOR
    13  }