This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
How would one edit a file?
Started by Agoldfish, 25 March 2014 - 07:32 PMPosted 25 March 2014 - 08:32 PM
The title pretty much explains it. How would one edit a file? I know how to open one, just not edit it. (Yes I looked on the Wiki.)
Edited on 25 March 2014 - 07:32 PM
Posted 25 March 2014 - 08:56 PM
I don't… what? How did you even make a program?
Posted 25 March 2014 - 08:58 PM
Well that was nice, reeeeeeeal encouraging there Comet. I guess I should have explained more. I mean edit a file from a program.I don't… what? How did you even make a program?
Posted 25 March 2014 - 08:59 PM
Either type "edit <programname>" in the CraftOS prompt, or you can look in your Minecraft folder for the computercraft files which you can edit. The programs are in your save folder.
Posted 25 March 2014 - 09:02 PM
Look at the post above yours, I explained it more there.Either type "edit <programname>" in the CraftOS prompt, or you can look in your Minecraft folder for the computercraft files which you can edit. The programs are in your save folder.
Posted 25 March 2014 - 09:05 PM
http://computercraft.info/wiki/Fs_%28API%29
tbh, i thought you would know this :P/>
You sure you looked?The FS API allows you to manipulate files and the filesystem.
tbh, i thought you would know this :P/>
Posted 25 March 2014 - 09:05 PM
Well, not really. You didn't.
But the only other way you may be talking about is by using the fs API.
Take a look at the wiki, and tell us if you need help. Try to be as specific as possible, so you can get the proper help.
But the only other way you may be talking about is by using the fs API.
Take a look at the wiki, and tell us if you need help. Try to be as specific as possible, so you can get the proper help.
Posted 25 March 2014 - 09:06 PM
Well, I thought there was something like fs.write(), but maybe I was mistaken. Death already helped me in IRC as I'm posting this.http://computercraft...ki/Fs_%28API%29You sure you looked?The FS API allows you to manipulate files and the filesystem.
tbh, i thought you would know this :P/>
Posted 25 March 2014 - 09:08 PM
Indirectly there is yes, in the table returned by fs.open.
http://computercraft.info/wiki/Fs.open
http://computercraft.info/wiki/Fs.open