In Development Package, API may change between versions.

import "github.com/egdaemon/eg/runtime/x/wasi/egfs"

<a name="CloneFS"></a>

func CloneFS

func CloneFS(ctx context.Context, dstdir string, rootdir string, archive fs.FS) (err error)

<a name="DirExists"></a>

func DirExists

func DirExists(path string) bool

DirExists returns true IFF a non-directory file exists at the provided path.

<a name="DirExistsFn"></a>

func DirExistsFn

func DirExistsFn(path string) func(ctx context.Context) bool

DirExistsFn returns a function compatible with eg.WhenFn that checks if a directory exists at the provided path.

<a name="DirNotExistsFn"></a>

func DirNotExistsFn

func DirNotExistsFn(path string) func(ctx context.Context) bool

DirNotExistsFn returns a function compatible with eg.WhenFn that checks that no directory exists at the provided path.

<a name="FileExists"></a>

func FileExists

func FileExists(path string) bool

FileExists returns true IFF a non-directory file exists at the provided path.

<a name="FileExistsFn"></a>

func FileExistsFn

func FileExistsFn(path string) func(ctx context.Context) bool

FileExistsFn returns a function compatible with eg.WhenFn that checks if a non-directory file exists at the provided path.

<a name="FileNotExistsFn"></a>

func FileNotExistsFn

func FileNotExistsFn(path string) func(ctx context.Context) bool

FileNotExistsFn returns a function compatible with eg.WhenFn that checks that no non-directory file exists at the provided path.

<a name="Find"></a>

func Find

func Find(tree fs.FS, pattern string) iter.Seq[string]

<a name="FindFirst"></a>

func FindFirst

func FindFirst(tree fs.FS, pattern string) string

<a name="Inspect"></a>

func Inspect

func Inspect(ctx context.Context, archive fs.FS) (err error)

print the list of files an directories contained within the FS.

<a name="MkDirs"></a>

func MkDirs

func MkDirs(perm fs.FileMode, paths ...string) (err error)