Method
Stat
(ctx context.Context, path string)
Source from the content-addressed store, hash-verified
| 285 | } |
| 286 | |
| 287 | func (rfs *RealFS) Stat(ctx context.Context, path string) (sandbox.FileInfo, error) { |
| 288 | info, err := os.Stat(path) |
| 289 | if err != nil { |
| 290 | return sandbox.FileInfo{}, err |
| 291 | } |
| 292 | return sandbox.FileInfo{ |
| 293 | Path: path, |
| 294 | Size: info.Size(), |
| 295 | ModTime: info.ModTime(), |
| 296 | IsDir: info.IsDir(), |
| 297 | Mode: int(info.Mode()), |
| 298 | }, nil |
| 299 | } |
| 300 | |
| 301 | func (rfs *RealFS) Glob(ctx context.Context, pattern string, opts *sandbox.GlobOptions) ([]string, error) { |
| 302 | // 简单的glob实现 |
Callers
nothing calls this directly
Tested by
no test coverage detected