Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/_docs/user-guide/golem.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ You can leverage the power of Eldritch with minimal exposure in the system proce
## Try it out

```bash
git clone git@github.com:KCarretto/realm.git
git clone git@github.com:spellshift/realm.git
cd realm/implants/golem
cargo run -- -i
# - or -
Expand Down
2 changes: 2 additions & 0 deletions tavern/tomes/file_list/main.eldritch
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ def file_list(path):
type_str = ""
if f['type'] == "Directory":
type_str = "Dir"
if f['type'] == "Link":
type_str = "Link"
if f['type'] == "File":
type_str = "File"
print(f['permissions']+"\t"+f['owner']+"\t"+f['group']+"\t"+str(f['size'])+"\t"+f['modified']+"\t"+type_str+"\t"+f['file_name']+"\n")
Expand Down
21 changes: 21 additions & 0 deletions tavern/tomes/file_tree/main.eldritch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
def file_list(path,tree):
tree="|\t\t"+tree
if file.is_dir(path):
files = file.list(path)
for f in files:
type_str = ""
if f['type'] == "Directory":
print(tree+"|---"+path+"/"+f['file_name']+"\n")
file_list(path+"/"+f['file_name'],tree)
if f['type'] == "Link":
print(tree+"|---"+f['file_name']+"\n")
if f['type'] == "File":
print(tree+"|---"+f['file_name']+"\n")
else:
print("Error: Invalid Path ("+path+")\n")

tree=""
print(input_params['path']+"\n")
file_list(input_params['path'],tree)
print("\n")
print("\n")
7 changes: 7 additions & 0 deletions tavern/tomes/file_tree/metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: List file tree
description: List the files and directories found at the path in tree-like format
paramdefs:
- name: path
type: string
label: File path
placeholder: "/etc/"