2014-11-13 15:00:04 -05:00
|
|
|
// +build windows
|
|
|
|
|
|
|
|
package system
|
|
|
|
|
2015-05-07 18:14:11 -04:00
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Lstat calls os.Lstat to get a fileinfo interface back.
|
|
|
|
// This is then copied into our own locally defined structure.
|
|
|
|
// Note the Linux version uses fromStatT to do the copy back,
|
|
|
|
// but that not strictly necessary when already in an OS specific module.
|
2015-07-28 12:13:12 -04:00
|
|
|
func Lstat(path string) (*StatT, error) {
|
2015-05-07 18:14:11 -04:00
|
|
|
fi, err := os.Lstat(path)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2015-07-28 12:13:12 -04:00
|
|
|
return &StatT{
|
2015-05-07 18:14:11 -04:00
|
|
|
name: fi.Name(),
|
|
|
|
size: fi.Size(),
|
|
|
|
mode: fi.Mode(),
|
|
|
|
modTime: fi.ModTime(),
|
|
|
|
isDir: fi.IsDir()}, nil
|
2014-11-13 15:00:04 -05:00
|
|
|
}
|