-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Components - Filesystem * Get subdirectory * Get file * List items * Fixed ls paramaters for Alpine
- Loading branch information
1 parent
aaf5785
commit 9e7e90b
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Get file | ||
description: Get file from directory. | ||
inputs: | ||
- {name: Directory, type: Directory} | ||
- {name: Subpath, type: String} | ||
outputs: | ||
- {name: File} | ||
implementation: | ||
container: | ||
image: alpine | ||
command: | ||
- sh | ||
- -ex | ||
- -c | ||
- | | ||
mkdir -p "$(dirname "$2")" | ||
cp -r "$0/$1" "$2" | ||
- inputPath: Directory | ||
- inputValue: Subpath | ||
- outputPath: File |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Get subdirectory | ||
description: Get subdirectory from directory. | ||
inputs: | ||
- {name: Directory, type: Directory} | ||
- {name: Subpath, type: String} | ||
outputs: | ||
- {name: Subdir, type: Directory} | ||
implementation: | ||
container: | ||
image: alpine | ||
command: | ||
- sh | ||
- -ex | ||
- -c | ||
- | | ||
mkdir -p "$(dirname "$2")" | ||
cp -r "$0/$1" "$2" | ||
- inputPath: Directory | ||
- inputValue: Subpath | ||
- outputPath: Subdir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: List items | ||
description: Recursively list directory contents. | ||
inputs: | ||
- {name: Directory, type: Directory} | ||
outputs: | ||
- {name: Items} | ||
implementation: | ||
container: | ||
image: alpine | ||
command: | ||
- sh | ||
- -ex | ||
- -c | ||
- | | ||
mkdir -p "$(dirname "$1")" | ||
#ls --almost-all --recursive "$0" > "$1" | ||
ls -A -R "$0" > "$1" | ||
- inputPath: Directory | ||
- outputPath: Items |