File System
File System plugin.
Available actions:
  • -> - write to file.
  • mkdir - create directory
  • rm - remove file or directory
  • mv - move file or directory
  • cp - copy file or directory
  • find - find files

Action Handler: Write to file

ID: com.fireblink.fbl.fs.file.write
Aliases:
  • fbl.fs.file.write
  • fs.file.write
  • file.write
  • ->
Example 1: Define File Content Inline
1
->:
2
# [optional] file path, if not provided content will be written to temporary location directory.
3
# Note: all missing parent directories will be automatically created
4
path: /tmp/test.txt
5
6
# [optional]
7
# Note: required if "path" (above) and "assignPathTo" (below) is not provided.
8
assignPathTo: # follows common assign logic practicies https://fbl.fireblink.com/plugins/common#assign-to
9
10
# [optional]
11
# Note: required if "path" and "assignPathTo" (above) is not provided
12
pushPathTo: # follows common push logic practicies https://fbl.fireblink.com/plugins/common#push-to
13
14
# [required] content of the file
15
content: |-
16
test content
Copied!
Example 2: Define File Content From Other File
1
->:
2
# [optional] file path, if not provided content will be written to temporary location directory.
3
# Note: all missing parent directories will be automatically created
4
path: /tmp/test.txt
5
6
# [optional]
7
# Note: required if "path" (above) and "assignPathTo" (below) is not provided.
8
assignPathTo: # follows common assign logic practicies https://fbl.fireblink.com/plugins/common#push-to
9
10
# [optional]
11
# Note: required if "path" and "assignPathTo" (above) is not provided
12
pushPathTo: # follows common push logic practicies https://fbl.fireblink.com/plugins/common#push-to
13
14
# [required] template file
15
# Note: global and then local EJS template processing will be applied to the template before writing
16
contentFromFile: /tmp/template.ejs
Copied!

Action Handler: Create Directories

Create directory (and all parent ones if missing).
ID: com.fireblink.fbl.fs.dir.create
Aliases:
  • fbl.fs.dir.create
  • fs.dir.create
  • dir.create
  • mkdir -p
  • mkdir
Example:
1
# create "child" directory
2
# if "parent" is missing it will be also created
3
mkdir: /tmp/parent/child
Copied!

Action Handler: Remove File or Directory

Removes file or directory for given path.
ID: com.fireblink.fbl.fs.remove
Aliases:
  • fbl.fs.remove
  • fbl.fs.rm
  • fs.remove
  • fs.rm
  • rm -rf
  • remove
  • rm
1
# remove "child"
2
rm: /tmp/parent/child
Copied!

Action Handler: Move File or Directory

Allows to move/rename file or entire directory.
ID: com.fireblink.fbl.fs.move
Aliases:
  • fbl.fs.move
  • fbl.fs.mv
  • fs.move
  • fs.mv
  • move
  • mv
Example 1: Move file to other folder
1
mv:
2
# move file.txt
3
from: /tmp/source/file.txt
4
5
# to "target" folder
6
# note: slash in the end is required if you want to specify a target folder
7
to: /tmp/target/
Copied!
Example 2: Move file to other folder and rename it
1
mv:
2
# move file.txt
3
from: /tmp/source/file.txt
4
5
# to "target" folder and rename it to "renamed.txt"
6
to: /tmp/target/renamed.txt
Copied!
Example 3: Move folder contents to other folder
1
mv:
2
# move everything from "source" folder
3
# note: slash in the end is required if you want to move folder contents rather then the folder itself
4
from: /tmp/source/
5
6
# to "target"
7
to: /tmp/target
Copied!

Action Handler: Copy File or Directory

Allows to copy file or entire directory.
ID: com.fireblink.fbl.fs.copy
Aliases:
  • fbl.fs.copy
  • fbl.fs.cp
  • fs.copy
  • fs.cp
  • copy
  • cp
Example 1: Copy file to other folder
1
cp:
2
# copy file.txt
3
from: /tmp/source/file.txt
4
5
# to "target" folder
6
# note: slash in the end is required if you want to specify a target folder
7
to: /tmp/target/
Copied!
Example 2: Copy file to other folder with different name
1
cp:
2
# copy file.txt
3
from: /tmp/source/file.txt
4
5
# to "target" folder and name it "renamed.txt"
6
to: /tmp/target/renamed.txt
Copied!
Example 3: Copy folder contents to other folder
1
cp:
2
# copy everything from "source" folder
3
# note: slash in the end is required if you want to copy folder contents rather then the folder itself
4
from: /tmp/source/
5
6
# to "target"
7
to: /tmp/target
Copied!

Action Handler: Find Files

Find files by mask.
ID: com.fireblink.fbl.fs.find
Aliases:
  • fbl.fs.find
  • fs.find
  • find
Example:
1
find:
2
# [required] list of masks to find files
3
include:
4
- /tmp/**/*.txt
5
6
# [optional] list of masks to exclude
7
exclude:
8
- /tmp/**/*.tmp.txt
9
10
# [required] result storage configuration
11
result:
12
# [optional] if provided all paths will be relative to give base directory
13
baseDir: /tmp
14
15
# [optional]
16
# Note: either `assignTo` or `pushTo` is requred
17
assignTo: # follows common assign logic practicies https://fbl.fireblink.com/plugins/common#push-to
18
19
# [optional]
20
# Note: either `assignTo` or `pushTo` is requred
21
pushTo: # follows common push logic practicies https://fbl.fireblink.com/plugins/common#push-to
Copied!