2014-11-13 20:00:04 +00:00
|
|
|
// +build windows
|
|
|
|
|
|
|
|
package system
|
|
|
|
|
2015-05-07 22:14:11 +00:00
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Some explanation for my own sanity, and hopefully maintainers in the
|
|
|
|
// future.
|
|
|
|
//
|
|
|
|
// 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-03-11 15:42:49 +00:00
|
|
|
func Lstat(path string) (*Stat_t, error) {
|
2015-05-07 22:14:11 +00:00
|
|
|
fi, err := os.Lstat(path)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
|
|
|
return &Stat_t{
|
|
|
|
name: fi.Name(),
|
|
|
|
size: fi.Size(),
|
|
|
|
mode: fi.Mode(),
|
|
|
|
modTime: fi.ModTime(),
|
|
|
|
isDir: fi.IsDir()}, nil
|
2014-11-13 20:00:04 +00:00
|
|
|
}
|