Directory Faking
#1
Posted 03 November 2014 - 08:19 AM
#2
Posted 03 November 2014 - 09:09 AM
#3
Posted 03 November 2014 - 09:17 AM
DannySMc, on 03 November 2014 - 09:09 AM, said:
I want the files for my desktop environment within the rom, rather than having them in another location.
#4
Posted 03 November 2014 - 09:56 AM
local _fs = fs fs.list = function(path) -- if the path starts with rom then redirect to the .rom folder end -- add fs.open, fs.copy, usw.
I did something a bit like this not too long ago. Basically this program squished a multi-file program in to one file and runs without needing to be extracted, although it can if you want to. Here's an example from Quest, go to line 6300 for the sandboxing stuff
#5
Posted 03 November 2014 - 09:57 AM
oeed, on 03 November 2014 - 09:56 AM, said:
local _fs = fs fs.list = function(path) -- if the path starts with rom then redirect to the .rom folder end -- add fs.open, fs.copy, usw.
I did something a bit like this not too long ago. Basically this program squished a multi-file program in to one file and runs without needing to be extracted, although it can if you want to. Here's an example from Quest, go to line 6300 for the sandboxing stuff
thanks
#6
Posted 03 November 2014 - 10:00 AM
connard does _ before fs add a .?
#7
Posted 03 November 2014 - 10:33 AM
oeed, on 03 November 2014 - 09:56 AM, said:
local _fs = fs fs.list = function(path) -- if the path starts with rom then redirect to the .rom folder end -- add fs.open, fs.copy, usw.
I did something a bit like this not too long ago. Basically this program squished a multi-file program in to one file and runs without needing to be extracted, although it can if you want to. Here's an example from Quest, go to line 6300 for the sandboxing stuff
Could you possibly refine that pseudo code hybrid please? after reading through both quest and the pseudo hybrid I still don't fully understand it.
#8
Posted 03 November 2014 - 10:38 AM
connordelaneyy, on 03 November 2014 - 10:33 AM, said:
oeed, on 03 November 2014 - 09:56 AM, said:
local _fs = fs fs.list = function(path) -- if the path starts with rom then redirect to the .rom folder end -- add fs.open, fs.copy, usw.
I did something a bit like this not too long ago. Basically this program squished a multi-file program in to one file and runs without needing to be extracted, although it can if you want to. Here's an example from Quest, go to line 6300 for the sandboxing stuff
Could you possibly refine that pseudo code hybrid please? after reading through both quest and the pseudo hybrid I still don't fully understand it.
Yea sorry, it's not the best pseudo code.
fs.list = function(path) if path starts with rom then --obviously change this to something that will work if _fs.exists(path) then -- use the existing file/folder if it exists _fs.list(path) else local realPath = path:replace...--replace /rom with .rom or whatever fs.list(realPath) end endYou then basically copy that for each different function, maybe may a resolve path function to use first.
#9
Posted 03 November 2014 - 10:45 AM
oeed, on 03 November 2014 - 10:38 AM, said:
connordelaneyy, on 03 November 2014 - 10:33 AM, said:
oeed, on 03 November 2014 - 09:56 AM, said:
local _fs = fs fs.list = function(path) -- if the path starts with rom then redirect to the .rom folder end -- add fs.open, fs.copy, usw.
I did something a bit like this not too long ago. Basically this program squished a multi-file program in to one file and runs without needing to be extracted, although it can if you want to. Here's an example from Quest, go to line 6300 for the sandboxing stuff
Could you possibly refine that pseudo code hybrid please? after reading through both quest and the pseudo hybrid I still don't fully understand it.
Yea sorry, it's not the best pseudo code.
fs.list = function(path) if path starts with rom then --obviously change this to something that will work if _fs.exists(path) then -- use the existing file/folder if it exists _fs.list(path) else local realPath = path:replace...--replace /rom with .rom or whatever fs.list(realPath) end endYou then basically copy that for each different function, maybe may a resolve path function to use first.
thanks again
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











