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
"os"
36
37
"path/filepath"
37
38
"strings"
@@ -69,10 +70,18 @@ func NewFromFile(file *os.File) *Path {
69
70
// Stat returns a FileInfo describing the named file. The result is
70
71
// cached internally for next queries. To ensure that the cached
71
72
// FileInfo entry is updated just call Stat again.
72
- func (p * Path ) Stat () (os .FileInfo , error ) {
73
+ func (p * Path ) Stat () (fs .FileInfo , error ) {
73
74
return os .Stat (p .path )
74
75
}
75
76
77
+ // Lstat returns a FileInfo describing the named file. If the file is
78
+ // a symbolic link, the returned FileInfo describes the symbolic link.
79
+ // Lstat makes no attempt to follow the link. If there is an error, it
80
+ // will be of type *PathError.
81
+ func (p * Path ) Lstat () (fs.FileInfo , error ) {
82
+ return os .Lstat (p .path )
83
+ }
84
+
76
85
// Clone create a copy of the Path object
77
86
func (p * Path ) Clone () * Path {
78
87
return New (p .path )
You can’t perform that action at this time.
0 commit comments