github.com/hauerwu/docker@v1.8.0-rc1/pkg/system/lstat_windows.go (about)

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