File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ package paths
32
32
import (
33
33
"fmt"
34
34
"io"
35
+ "io/fs"
35
36
"io/ioutil"
36
37
"os"
37
38
"path/filepath"
@@ -70,10 +71,18 @@ func NewFromFile(file *os.File) *Path {
70
71
// Stat returns a FileInfo describing the named file. The result is
71
72
// cached internally for next queries. To ensure that the cached
72
73
// FileInfo entry is updated just call Stat again.
73
- func (p * Path ) Stat () (os .FileInfo , error ) {
74
+ func (p * Path ) Stat () (fs .FileInfo , error ) {
74
75
return os .Stat (p .path )
75
76
}
76
77
78
+ // Lstat returns a FileInfo describing the named file. If the file is
79
+ // a symbolic link, the returned FileInfo describes the symbolic link.
80
+ // Lstat makes no attempt to follow the link. If there is an error, it
81
+ // will be of type *PathError.
82
+ func (p * Path ) LStat () (fs.FileInfo , error ) {
83
+ return os .Lstat (p .path )
84
+ }
85
+
77
86
// Clone create a copy of the Path object
78
87
func (p * Path ) Clone () * Path {
79
88
return New (p .path )
You can’t perform that action at this time.
0 commit comments