We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6ef5f9 commit b9efe39Copy full SHA for b9efe39
fs/sub.go
@@ -78,6 +78,19 @@ func (f *SubdirFS) Sub(dir string) (FS, error) {
78
return &SubdirFS{f.Fsys, full}, nil
79
}
80
81
+func (f *SubdirFS) Stat(name string) (FileInfo, error) {
82
+ return f.StatContext(context.Background(), name)
83
+}
84
+
85
+func (f *SubdirFS) StatContext(ctx context.Context, name string) (FileInfo, error) {
86
+ full, err := f.fullName("stat", name)
87
+ if err != nil {
88
+ return nil, err
89
+ }
90
+ info, err := StatContext(ctx, f.Fsys, full)
91
+ return info, f.fixErr(err)
92
93
94
func (f *SubdirFS) Open(name string) (File, error) {
95
return f.OpenContext(context.Background(), name)
96
0 commit comments