Documentation
¶
Overview ¶
Package os exposes functionality from Go's os package as an Elvish module.
Index ¶
Constants ¶
View Source
const DevTTY = "/dev/tty"
Variables ¶
View Source
var ErrEmptyPath = errs.BadValue{
What: "path", Valid: "non-empty string", Actual: "empty string"}
ErrEmptyPath is thrown by remove and remove-all when given an empty path.
View Source
var Ns = eval.BuildNsNamed("os"). AddVars(map[string]vars.Var{ "dev-null": vars.NewReadOnly(os.DevNull), "dev-tty": vars.NewReadOnly(DevTTY), }). AddGoFns(map[string]any{ "-is-exist": isExist, "-is-not-exist": isNotExist, "mkdir": mkdir, "mkdir-all": mkdirAll, "symlink": os.Symlink, "remove": remove, "remove-all": removeAll, "rename": os.Rename, "chmod": chmod, "stat": stat, "exists": exists, "is-dir": IsDir, "is-regular": IsRegular, "eval-symlinks": filepath.EvalSymlinks, "temp-dir": TempDir, "temp-file": TempFile, }).Ns()
Ns is the Elvish namespace for this module.
Functions ¶
func IsRegular ¶
IsRegular is exported so that the implementation may be shared by the path: module.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.