github.com/hauerwu/docker@v1.8.0-rc1/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.Stat_t type pertaining to that file.
    11  //
    12  // Throws an error if the file does not exist
    13  func Lstat(path string) (*Stat_t, 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  }