Windows: Archive package changes for Windows daemon

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard 2015-05-07 15:14:11 -07:00
parent 24fd826fc0
commit f883e81d79
11 changed files with 166 additions and 56 deletions

View file

@ -2,7 +2,28 @@
package system
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.
func Lstat(path string) (*Stat_t, error) {
// should not be called on cli code path
return nil, ErrNotSupportedPlatform
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
}