1
0
mirror of https://github.com/Adorable-Catgirl/Zorya-NEO.git synced 2024-11-27 12:48:07 +11:00
Zorya-NEO/lib/fs_arcfs/init.lua
2020-06-18 14:49:36 -05:00

55 lines
1011 B
Lua

local arcfs = {}
function arcfs.make(arc)
local proxy = {}
local function ni()return nil, "not implemented"end
local hands = {}
proxy.remove = ni
proxy.makeDirectory = ni
function proxy.exists(path)
return arc:exists(path)
end
function proxy.spaceUsed()
return 0
end
function proxy.open(path, mode)
if mode ~= "r" and mode ~= "rb" then
return nil, "read-only filesystem"
end
end
function proxy.isReadOnly()
return true
end
proxy.write = ni
function proxy.spaceTotal()
return 0
end
function proxy.isDirectory(dir)
if arc.isdir then return arc:isdir(dir) end
return #arc:list(dir) > 0
end
function proxy.list(path)
return arc:list(path)
end
function proxy.lastModified(path)
return 0
end
function proxy.getLabel()
return "ARCFS_VOLUME"
end
function proxy.close(hand)
end
function proxy.size(path)
return
end
function proxy.read(hand, count)
end
function proxy.seek(hand, whence, amt)
end
function proxy.setLabel()
return "ARCFS_VOLUME"
end
end