github.com/jingleWang/moby@v1.13.1/pkg/system/lstat_windows.go (about)

     1  // +build windows
     2  
     3  package system
     4  
     5  import (
     6  	"os"
     7  )
     8  
     9  // Lstat calls os.Lstat to get a fileinfo interface back.
    10  // This is then copied into our own locally defined structure.
    11  // Note the Linux version uses fromStatT to do the copy back,
    12  // but that not strictly necessary when already in an OS specific module.
    13  func Lstat(path string) (*StatT, error) {
    14  	fi, err := os.Lstat(path)
    15  	if err != nil {
    16  		return nil, err
    17  	}
    18  
    19  	return &StatT{
    20  		name:    fi.Name(),
    21  		size:    fi.Size(),
    22  		mode:    fi.Mode(),
    23  		modTime: fi.ModTime(),
    24  		isDir:   fi.IsDir()}, nil
    25  }