mirror of
https://github.com/ShadowKatStudios/OC-Minitel.git
synced 2024-11-26 03:48:06 +11:00
Compare commits
2 Commits
5679885592
...
f0527243b4
Author | SHA1 | Date | |
---|---|---|---|
f0527243b4 | |||
69815096fe |
@ -1,17 +1,17 @@
|
||||
local fsproxy = require "fsproxy"
|
||||
local rpc = require "rpc"
|
||||
local fs = require "filesystem"
|
||||
local shell = require "shell"
|
||||
local rpc = require "rpc"
|
||||
|
||||
local tA = {...}
|
||||
local tA, tO = shell.parse(...)
|
||||
if #tA < 1 then
|
||||
print("Usage: exportfs <directory> [directory] ...")
|
||||
print("Usage: exportfs <directory> [-d] [--rw] [--name=<name>]")
|
||||
return
|
||||
end
|
||||
|
||||
for k,v in pairs(tA) do
|
||||
local px = fsproxy.new(v)
|
||||
for l,m in pairs(px) do
|
||||
rpc.register("fs_"..v.."_"..l,m)
|
||||
end
|
||||
print(v)
|
||||
local px = fsproxy.new(tA[1], not tO.rw)
|
||||
local name = tO.name or tA[1]
|
||||
for l,m in pairs(px) do
|
||||
m = not tO.d and m or nil
|
||||
rpc.register("fs_"..name.."_"..l,m)
|
||||
end
|
||||
print(string.format("%s (%s)", name, (tO.rw and "rw") or "ro"))
|
||||
|
@ -30,7 +30,7 @@ function fsproxy.new(path,wp) -- string boolean -- table -- Returns a proxy obje
|
||||
end
|
||||
local handles = {}
|
||||
function proxy.isReadOnly()
|
||||
return originalProxy.isReadOnly()
|
||||
return wp or originalProxy.isReadOnly()
|
||||
end
|
||||
function proxy.getLabel()
|
||||
return originalProxy.getLabel()
|
||||
|
Loading…
Reference in New Issue
Block a user