mirror of
https://github.com/kepler155c/opus
synced 2025-10-20 18:27:40 +00:00
web running os
This commit is contained in:
@@ -29,7 +29,7 @@ local function remoteCommand(node, msg)
|
||||
error('netfs: Connection failed', 2)
|
||||
end
|
||||
|
||||
local methods = { 'delete', 'exists', 'getFreeSpace', 'getSize', 'makeDir' }
|
||||
local methods = { 'delete', 'exists', 'getFreeSpace', 'makeDir' }
|
||||
|
||||
local function resolveDir(dir, node)
|
||||
dir = dir:gsub(node.mountPoint, '', 1)
|
||||
@@ -101,6 +101,16 @@ function netfs.isReadOnly(node, dir)
|
||||
})
|
||||
end
|
||||
|
||||
function netfs.getSize(node, dir)
|
||||
if dir == node.mountPoint and node.directory == '' then
|
||||
return 0
|
||||
end
|
||||
return remoteCommand(node, {
|
||||
fn = 'getSize',
|
||||
args = { resolveDir(dir, node) },
|
||||
})
|
||||
end
|
||||
|
||||
function netfs.find(node, spec)
|
||||
spec = resolveDir(spec, node)
|
||||
local list = remoteCommand(node, {
|
||||
|
Reference in New Issue
Block a user