mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
add diskUsage effect (#2297)
This commit is contained in:
committed by
Matt Hill
parent
26ddf769b1
commit
71a15cf222
@@ -185,6 +185,14 @@ const runRsync = (
|
||||
}
|
||||
};
|
||||
|
||||
const diskUsage = async ({
|
||||
volumeId = requireParam("volumeId"),
|
||||
path = requireParam("path"),
|
||||
} = { volumeId: null, path: null }) => {
|
||||
const [used, total] = await Deno.core.opAsync("disk_usage", volumeId, path);
|
||||
return { used, total }
|
||||
}
|
||||
|
||||
const currentFunction = Deno.core.opSync("current_function");
|
||||
const input = Deno.core.opSync("get_input");
|
||||
const variable_args = Deno.core.opSync("get_variable_args");
|
||||
@@ -213,7 +221,8 @@ const effects = {
|
||||
runDaemon,
|
||||
signalGroup,
|
||||
runRsync,
|
||||
readDir
|
||||
readDir,
|
||||
diskUsage,
|
||||
};
|
||||
|
||||
const defaults = {
|
||||
|
||||
Reference in New Issue
Block a user