Janet 1.38.0-73334f3 Documentation
(Other Versions: 1.37.1 1.36.0 1.35.0 1.34.0 1.31.0 1.29.1 1.28.0 1.27.0 1.26.0 1.25.1 1.24.0 1.23.0 1.22.0 1.21.0 1.20.0 1.19.0 1.18.1 1.17.1 1.16.1 1.15.0 1.13.1 1.12.2 1.11.1 1.10.1 1.9.1 1.8.1 1.7.0 1.6.0 1.5.1 1.5.0 1.4.0 1.3.1 )

Shell Utilities

Index

shutil/abspath shutil/basename shutil/clear-cache shutil/clear-manifest shutil/clexe-shell shutil/color shutil/copy shutil/copyfile shutil/create-dirs shutil/devnull shutil/dirname shutil/do-monkeypatch shutil/drop1-shell shutil/exec-slurp shutil/filepath-replace shutil/find-build-dir shutil/find-cache shutil/find-manifest shutil/find-manifest-dir shutil/is-mingw shutil/is-win shutil/is-win-or-mingw shutil/path-splitter shutil/rimraf shutil/rm shutil/run-patched shutil/run-repl shutil/run-script shutil/shell shutil/undo-monkeypatch


shutil/abspath function source

(abspath path)

Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).


shutil/basename function source

(basename path)

Get the filename of a path without any leading directory components.


shutil/clear-cache function source

(clear-cache)

Clear the global git cache.


shutil/clear-manifest function source

(clear-manifest)

Clear the global installation manifest.


shutil/clexe-shell function source

(clexe-shell & args)


shutil/color function source

(color input-color text)

Color text with ascii escape sequences if (os/isatty)


shutil/copy function source

(copy src dest)

Copy a file or directory recursively from one location to another.


shutil/copyfile function source

(copyfile src dest)

Copy a file one location to another.


shutil/create-dirs function source

(create-dirs dest)

Create all directories needed for a file (mkdir -p).


shutil/devnull function source

(devnull)


shutil/dirname function source

(dirname path)

Get the directory of a file without the filename.


shutil/do-monkeypatch function source

(do-monkeypatch build-dir)

Modify the existing environment to have the same paths as the test environment.


shutil/drop1-shell function source

(drop1-shell std args)

Variant of shell to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.


shutil/exec-slurp function source

(exec-slurp & args)

Read stdout of subprocess and return it trimmed in a string.


shutil/filepath-replace function source

(filepath-replace repo)

Remove special characters from a string or path to make it into a path segment.


shutil/find-build-dir function source

(find-build-dir)

Gets the build directory to output files to.


shutil/find-cache function source

(find-cache)

Return the path to the global cache.


shutil/find-manifest function source

(find-manifest name)

Get the full path of a manifest file given a package name.


shutil/find-manifest-dir function source

(find-manifest-dir)

Get the path to the directory containing manifests for installed packages.


shutil/is-mingw function source

(is-mingw)

Check if built with mingw


shutil/is-win function source

(is-win)

Check if we should assume a DOS-like shell or default to posix shell.


shutil/is-win-or-mingw function source

(is-win-or-mingw)

Check if built with mingw


shutil/path-splitter core/peg source

split paths on / and .


shutil/rimraf function source

(rimraf path)

Hard delete directory tree


shutil/rm function source

(rm path)

Remove a directory and all sub directories.


shutil/run-patched function source

(run-patched & extra-args)

Run a subprocess Janet repl that has the same environment as the test environment.


shutil/run-repl function source

(run-repl)

Run a repl in the monkey patched test environment


shutil/run-script function source

(run-script path)

Run a local script in the monkey patched environment.


shutil/shell function source

(shell & args)

Do a shell command


shutil/undo-monkeypatch function source

(undo-monkeypatch old-builddir)