Add support for uid/gid
This commit is contained in:
@@ -142,7 +142,15 @@ func (f *File) ReadDir(n int) ([]fs.DirEntry, error) {
|
||||
|
||||
// Returns the file's fs.FileInfo
|
||||
func (f *File) Stat() (fs.FileInfo, error) {
|
||||
return newFileInfo(f.b.Name, &f.b.Inode), nil
|
||||
uid, err := f.b.Uid(&f.r.Low)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
gid, err := f.b.Gid(&f.r.Low)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return newFileInfo(f.b.Name, uid, gid, &f.b.Inode), nil
|
||||
}
|
||||
|
||||
// SymlinkPath returns the symlink's target path. Is the File isn't a symlink, returns an empty string.
|
||||
|
||||
Reference in New Issue
Block a user