MCPcopy Create free account
hub / github.com/astercloud/aster / Stat

Method Stat

pkg/tools/builtin/testutils.go:287–299  ·  view source on GitHub ↗
(ctx context.Context, path string)

Source from the content-addressed store, hash-verified

285}
286
287func (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
301func (rfs *RealFS) Glob(ctx context.Context, pattern string, opts *sandbox.GlobOptions) ([]string, error) {
302 // 简单的glob实现

Callers

nothing calls this directly

Calls 2

StatMethod · 0.65
SizeMethod · 0.45

Tested by

no test coverage detected