1.0.2 • Published 3 years ago

@runnerty/executor-filesystem v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

NPM version Downloads

Filesystem executor for Runnerty:

Installation:

Through NPM

npm i @runnerty/executor-filesystem

You can also add modules to your project with runnerty-cli

npx runnerty-cli add @runnerty/executor-filesystem

This command installs the module in your project, adds example configuration in your config.json and creates an example plan of use.

If you have installed runnerty-cli globally you can include the module with this command:

rty add @runnerty/executor-filesystem

Configuration sample:

Add in config.json:

{
  "id": "filesystem_default",
  "type": "@runnerty-executor-filesystem"
}

Plan sample:

Add in plan.json:

{
  "id": "filesystem_default",
  "path": "/etc/runnerty/*.log",
  "operation": "stat"
}
{
  "id": "filesystem_default",
  "path": ["/etc/runnerty/*.log", "/etc/runnerty/*.zip"],
  "operation": "ls",
  "options": {
    "orderBy": { "attribute": ["size", "file"], "order": "desc" }
  }
}

Operations:

OperationDescriptionOutput
stat
ls
mkdir
mv
rm
touch
chown
chmod
symlink

Results output

  • PROCESS_EXEC_MSG_OUTPUT: Array files/directories stats.
  • PROCESS_EXEC_ERR_OUTPUT: Error output message.