1.1.3 • Published 2 years ago

@actions/io v1.1.3

Weekly downloads
71,335
License
MIT
Repository
github
Last release
2 years 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-26@docker/actions-toolkit@cypress/github-action@cpany/action@cpany/cli@peter-evans/actions-gitk8s-deploy-actiontool-cache-mirror@akiojin/unity-bulid-github-action@chkimes/actions-cache@actions/cache@actions/exec@actions/tool-cache@actions-for-rust/core@hiberbee/github-actions@fluffy-spoon/action@khoazero123/actions-toolkit-cache@martijnhols/actions-cache@enescakir/cache@jamesives/fetch-api-data-action@jamesives/github-pages-deploy-action@jamesives/github-sponsors-readme-action@khulnasoft/github-action@humble-barnacle001/fetch-api-data-action@kcws/github-actions@rabbitcc/actions@rinse-repeat/actions-rs-core@nx-tools/coremomenticpack-h5p-actionrsync-by-joesetup-nuget-exesetup-phpsetup-actsetup-easy-setupnpm-demo-shinnpm-installgithub-script-actiongithub-actions.cache-s3github-actions.warp-cachegithub-actions-s3-cachegithub-actions.cache-buildjetgithub-actions.cache-buildjet-patchedgithub-checkoutgithub-fetch-workflow-artifactgithub-pages-deploy-actionhabitat-action@ubicloud/cache@thewtex/setup-micromamba@vanducvo/cache@useblacksmith/cache@urcomputeringpal/github-script-ts@terradatum/auto-actionaction-notificationsaction-setup-condaactions-output-wrapperactions-github-pagesactions-js-toolkitazure-actions-appservice-restazure-actions-utilityazure-actions-webclientazure-actions-webclient-ahmelsayedazure-actions-webclient-testazure-arm-restazure-pipelines-webclientazure-pipelines-core-libcombine-dependabot-prscli-actioncloudbuild-task-github-actionscypress-test-resultscache-nx-buildjetfetch-api-data-actionfuckup-ruby@stackfort/iac-cicd@swlynch99/actions-cache-gcs@teamhive/core-actions@teamhive/core-actions-common@skifree/expo-github-action
1.1.3

2 years ago

1.1.2

3 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago