1
0
mirror of https://github.com/Adorable-Catgirl/Zorya-NEO.git synced 2024-11-23 18:58:06 +11:00
Zorya-NEO/lib/fs_arcfs/init.lua

55 lines
1011 B
Lua
Raw Normal View History

2020-03-13 08:01:05 +11:00
local arcfs = {}
function arcfs.make(arc)
local proxy = {}
local function ni()return nil, "not implemented"end
2020-05-17 14:23:43 +10:00
local hands = {}
2020-03-16 03:43:42 +11:00
proxy.remove = ni
proxy.makeDirectory = ni
2020-03-13 08:01:05 +11:00
function proxy.exists(path)
2020-05-17 14:23:43 +10:00
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)
2020-06-19 05:49:36 +10:00
return
2020-05-17 14:23:43 +10:00
end
function proxy.read(hand, count)
2020-03-13 08:01:05 +11:00
end
2020-05-17 14:23:43 +10:00
function proxy.seek(hand, whence, amt)
end
function proxy.setLabel()
return "ARCFS_VOLUME"
end
2020-03-13 08:01:05 +11:00
end