Compare commits
1 Commits
849ecb7dd6
...
1.2.3
| Author | SHA1 | Date | |
|---|---|---|---|
| e41bd6bee7 |
@@ -132,17 +132,6 @@ function proxy:open(path, mode)
|
|||||||
if type(step[steps[#steps]]) == "function" then
|
if type(step[steps[#steps]]) == "function" then
|
||||||
return step[steps[#steps]]("open", mode)
|
return step[steps[#steps]]("open", mode)
|
||||||
end
|
end
|
||||||
elseif tostring(steps[1])=="self" then
|
|
||||||
local task=kernel.currentTask
|
|
||||||
local step = newtaskproxy(task)
|
|
||||||
for i=2, #steps-1 do
|
|
||||||
local dat = step[steps[i]]
|
|
||||||
if type(dat) ~= "table" then error("ENFILE") end
|
|
||||||
step=dat
|
|
||||||
end
|
|
||||||
if type(step[steps[#steps]]) == "function" then
|
|
||||||
return step[steps[#steps]]("open", mode)
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
for i=1, #steps-1 do
|
for i=1, #steps-1 do
|
||||||
local dat = step[steps[i]]
|
local dat = step[steps[i]]
|
||||||
@@ -177,21 +166,6 @@ function proxy:type(path, mode)
|
|||||||
if type(step[steps[#steps]]) == "table" then
|
if type(step[steps[#steps]]) == "table" then
|
||||||
return "directory"
|
return "directory"
|
||||||
end
|
end
|
||||||
elseif tostring(steps[1])=="self" then
|
|
||||||
local task=kernel.currentTask
|
|
||||||
if #steps==1 then return "directory" end
|
|
||||||
local step = newtaskproxy(task)
|
|
||||||
for i=2, #steps-1 do
|
|
||||||
local dat = step[steps[i]]
|
|
||||||
if type(dat) ~= "table" then error("ENFILE") end
|
|
||||||
step=dat
|
|
||||||
end
|
|
||||||
if type(step[steps[#steps]]) == "function" then
|
|
||||||
return step[steps[#steps]]("type", mode)
|
|
||||||
end
|
|
||||||
if type(step[steps[#steps]]) == "table" then
|
|
||||||
return "directory"
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
for i=1, #steps-1 do
|
for i=1, #steps-1 do
|
||||||
local dat = step[steps[i]]
|
local dat = step[steps[i]]
|
||||||
@@ -212,7 +186,7 @@ function proxy:list(path)
|
|||||||
local steps = kernel.vfs.splitPath(path)
|
local steps = kernel.vfs.splitPath(path)
|
||||||
local step = data
|
local step = data
|
||||||
if #steps == 0 then
|
if #steps == 0 then
|
||||||
return table.merge(table.keys(data),table.keys(kernel.tasks),{"self"})
|
return table.merge(table.keys(data),table.keys(kernel.tasks))
|
||||||
end
|
end
|
||||||
if tonumber(steps[1]) then
|
if tonumber(steps[1]) then
|
||||||
local task=kernel.tasks[steps[1]]
|
local task=kernel.tasks[steps[1]]
|
||||||
@@ -226,18 +200,6 @@ function proxy:list(path)
|
|||||||
if type(step[steps[#steps]]) == "table" then
|
if type(step[steps[#steps]]) == "table" then
|
||||||
return table.keys(step[steps[#steps]])
|
return table.keys(step[steps[#steps]])
|
||||||
end
|
end
|
||||||
elseif tostring(steps[1])=="self" then
|
|
||||||
local task=kernel.currentTask
|
|
||||||
local step = newtaskproxy(task)
|
|
||||||
if #steps==1 then return table.keys(step) end
|
|
||||||
for i=2, #steps-1 do
|
|
||||||
local dat = step[steps[i]]
|
|
||||||
if type(dat) ~= "table" then error("ENOENT") end
|
|
||||||
step=dat
|
|
||||||
end
|
|
||||||
if type(step[steps[#steps]]) == "table" then
|
|
||||||
return table.keys(step[steps[#steps]])
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
for i=1, #steps-1 do
|
for i=1, #steps-1 do
|
||||||
local dat = step[steps[i]]
|
local dat = step[steps[i]]
|
||||||
|
|||||||
Reference in New Issue
Block a user