1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-11-26 11:58:06 +11:00

Compare commits

..

No commits in common. "f0527243b4ebf3577b80df2b8ff6f63a022425ac" and "5679885592b6ab9507f3bc597cc9fe864548e08b" have entirely different histories.

2 changed files with 11 additions and 11 deletions

View File

@ -1,17 +1,17 @@
local fsproxy = require "fsproxy" local fsproxy = require "fsproxy"
local fs = require "filesystem"
local shell = require "shell"
local rpc = require "rpc" local rpc = require "rpc"
local fs = require "filesystem"
local tA, tO = shell.parse(...) local tA = {...}
if #tA < 1 then if #tA < 1 then
print("Usage: exportfs <directory> [-d] [--rw] [--name=<name>]") print("Usage: exportfs <directory> [directory] ...")
return return
end end
local px = fsproxy.new(tA[1], not tO.rw)
local name = tO.name or tA[1] for k,v in pairs(tA) do
local px = fsproxy.new(v)
for l,m in pairs(px) do for l,m in pairs(px) do
m = not tO.d and m or nil rpc.register("fs_"..v.."_"..l,m)
rpc.register("fs_"..name.."_"..l,m) end
print(v)
end end
print(string.format("%s (%s)", name, (tO.rw and "rw") or "ro"))

View File

@ -30,7 +30,7 @@ function fsproxy.new(path,wp) -- string boolean -- table -- Returns a proxy obje
end end
local handles = {} local handles = {}
function proxy.isReadOnly() function proxy.isReadOnly()
return wp or originalProxy.isReadOnly() return originalProxy.isReadOnly()
end end
function proxy.getLabel() function proxy.getLabel()
return originalProxy.getLabel() return originalProxy.getLabel()