feat: Add in the read dir. (#2141)

* feat: Add in the read dir.

Have a test that proves that this is working.

* chore: Let the read dir work while in a read only mode

* revert: To old sync
This commit is contained in:
J H
2023-02-17 12:32:18 -07:00
committed by Aiden McClelland
parent 4d3df867da
commit 2736fa5202
4 changed files with 138 additions and 1 deletions

View File

@@ -114,6 +114,10 @@ const readJsonFile = async (
const createDir = (
{ volumeId = requireParam("volumeId"), path = requireParam("path") } = requireParam("options"),
) => Deno.core.opAsync("create_dir", volumeId, path);
const readDir = (
{ volumeId = requireParam("volumeId"), path = requireParam("path") } = requireParam("options"),
) => Deno.core.opAsync("read_dir", volumeId, path);
const removeDir = (
{ volumeId = requireParam("volumeId"), path = requireParam("path") } = requireParam("options"),
) => Deno.core.opAsync("remove_dir", volumeId, path);
@@ -186,7 +190,8 @@ const effects = {
sleep,
runDaemon,
signalGroup,
runRsync
runRsync,
readDir
};
const defaults = {