github.com/brahmaroutu/docker@v1.2.1-0.20160809185609-eb28dde01f16/pkg/system/lstat.go (about)

     1  // +build !windows
     2  
     3  package system
     4  
     5  import (
     6  	"syscall"
     7  )
     8  
     9  // Lstat takes a path to a file and returns
    10  // a system.StatT type pertaining to that file.
    11  //
    12  // Throws an error if the file does not exist
    13  func Lstat(path string) (*StatT, error) {
    14  	s := &syscall.Stat_t{}
    15  	if err := syscall.Lstat(path, s); err != nil {
    16  		return nil, err
    17  	}
    18  	return fromStatT(s)
    19  }