1.1.3 • Published 1 year ago

@actions/io v1.1.3

Weekly downloads
71,335
License
MIT
Repository
github
Last release
1 year ago

@actions/io

Core functions for cli filesystem scenarios

Usage

mkdir -p

Recursively make a directory. Follows rules specified in man mkdir with the -p option specified:

const io = require('@actions/io');

await io.mkdirP('path/to/make');

cp/mv

Copy or move files or folders. Follows rules specified in man cp and man mv:

const io = require('@actions/io');

// Recursive must be true for directories
const options = { recursive: true, force: false }

await io.cp('path/to/directory', 'path/to/dest', options);
await io.mv('path/to/file', 'path/to/dest');

rm -rf

Remove a file or folder recursively. Follows rules specified in man rm with the -r and -f rules specified.

const io = require('@actions/io');

await io.rmRF('path/to/directory');
await io.rmRF('path/to/file');

which

Get the path to a tool and resolves via paths. Follows the rules specified in man which.

const exec = require('@actions/exec');
const io = require('@actions/io');

const pythonPath: string = await io.which('python', true)

await exec.exec(`"${pythonPath}"`, ['main.py']);
@airvzxf/cache@everything-registry/sub-chunk-26github-actions.cache-s3fetch-api-data-action@humble-barnacle001/fetch-api-data-action@nx-tools/corefuckup-ruby@martijnhols/actions-cachegithub-fetch-workflow-artifactgithub-script-actiongithub-actions.cache-buildjetgithub-actions.cache-buildjet-patchedgithub-actions.warp-cachegithub-checkoutgithub-pages-deploy-action@khoazero123/actions-toolkit-cache@khulnasoft/github-action@rinse-repeat/actions-rs-corehabitat-action@hiberbee/github-actions@jamesives/fetch-api-data-action@jamesives/github-pages-deploy-action@jamesives/github-sponsors-readme-action@rabbitcc/actions@peter-evans/actions-git@skifree/expo-github-action@thewtex/setup-micromambaazure-pipelines-core-libazure-pipelines-webclientazure-arm-restazure-actions-appservice-restazure-actions-utilityazure-actions-webclientazure-actions-webclient-ahmelsayedazure-actions-webclient-test@teamhive/core-actions@teamhive/core-actions-common@urcomputeringpal/github-script-ts@useblacksmith/cachenpm-install@cypress/github-actionmomenticaction-setup-condaactions-github-pagesactions-output-wrapperactions-js-toolkitaction-notifications@actions-for-rust/core@actions/cache@actions/exec@actions/tool-cachecache-nx-buildjet@cpany/cli@cpany/actionnpm-demo-shin@vanducvo/cache@akiojin/unity-bulid-github-action@terradatum/auto-action@chkimes/actions-cachecypress-test-resultspack-h5p-action@docker/actions-toolkitcloudbuild-task-github-actionscombine-dependabot-prscli-actionrsync-by-joesetup-actsetup-nuget-exesetup-phptool-cache-mirror@fluffy-spoon/action
1.1.3

1 year ago

1.1.2

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago