Progress Tree:
BIOS——————-|
|—————BootDrive
|
|—————BootAntivirus
|
I want it to have a file browser, a great GUI, custom background, color, built-in programs…An OS is a program that does certain things. Different people have different opinions of what "certain things" are, especially in ComputerCraft. What do you want it to do?
An installer is just a program that writes other programs to files.
You could override fs.open to disallow opening files in a certain directory.
local fso = fs.open
local fsd = fs.delete
local fsiro = fs.isReadOnly
local blocked = {
["somedir"] = true
}
function fs.open(dir,mode)
if blocked[dir] then
error("Can't access file!",2)
end
return fso(dir,mode)
end
function fs.delete(dir)
if blocked[dir] then
error("Can't access file!",2)
end
return fsd(dir)
end
function fs.isReadOnly(dir)
if blocked[dir] then
return true
end
return fsiro(dir)
end
I hope there aren't any typos :D/>
if http then
file = http.get("URL PATH TO FILE HERE")
if file then
h = fs.open("PATH OF INSTALL HERE", w)
h.write(file.readAll())
h.close()
else
print("Seems like we couldn't find the file")
end
else
print("Looks like you can't access the internet")
end
Since when can you open a directory?Here, to stop peoples accessing your folders/files:I hope there aren't any typos :D/>/>local fso = fs.open local fsd = fs.delete local fsiro = fs.isReadOnly local blocked = { ["somedir"] = true } function fs.open(dir,mode) if blocked[dir] then error("Can't access file!",2) end return fso(dir,mode) end function fs.delete(dir) if blocked[dir] then error("Can't access file!",2) end return fsd(dir) end function fs.isReadOnly(dir) if blocked[dir] then return true end return fsiro(dir) end
It's built into ComputerCraft, in Java. You can simulate it with Lua. fs.isReadOnly returns true for read-only files, and some other functions throw errors.I am still wondering how the console in the Turtle OS could block us from editing the program files.
So your questions are these?I want it to have a file browser, a great GUI, custom background, color, built-in programs…