So I'm writing an operating system, and started adding file permissions yesterday. I started replacing functions in FS with my own, but had to go, so I shut down CCDesk. Today I started it up again, but now I cannot use the edit program, or anything else that uses the FS API. I've made a lot of work and don't want to restart. Is it possible to "restore" the FS API back to its original state? Thanks
--Dlcruz


Restoring Fs Api
Started by Dlcruz129, Aug 05 2013 12:45 PM
3 replies to this topic
#1
Posted 05 August 2013 - 12:45 PM
#2
Posted 05 August 2013 - 01:03 PM
Is your OS overwriting the FS API every time you start a new computer in CC Desk or are you making the changes in the bios.lua file?
Either way, you'll want to hold on to the original FS API by creating a copy of all of the functions in the _G.fs table before overwriting the functions. Using that table, you could either reference it directly in order to keep the overwritten functions and the original functions, and or you could write a function to restore the original FS API.
Copying the functions code example:
Restoration function example:
Either way, you'll want to hold on to the original FS API by creating a copy of all of the functions in the _G.fs table before overwriting the functions. Using that table, you could either reference it directly in order to keep the overwritten functions and the original functions, and or you could write a function to restore the original FS API.
Copying the functions code example:
Spoiler
Restoration function example:
Spoiler
#3
Posted 05 August 2013 - 04:10 PM
Go to %appdata%\.minecraft\computer\<computer ID> and rename startup to something else, so it won't run. Then reboot the computer in CCDesk.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users