This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Xemiru's profile picture

File Interaction : Deleting

Started by Xemiru, 13 February 2012 - 10:33 PM
Xemiru #1
Posted 13 February 2012 - 11:33 PM
I was wondering if anyone knows how to delete a file with LUA. All I know is the creating and editing. Also, is there a possible way to refer to an API that's not included in ComputerCraft's directory, like an API in a disk?
bWGi #2
Posted 13 February 2012 - 11:37 PM
i haven't checked but i believe this works
os.remove (filename)
Advert #3
Posted 13 February 2012 - 11:55 PM
Type "help fs" ingame (in a computer); it'll tell you the filesystem commands.
You may also be intrested in "help apis"

You can load an API like this:
os.loadAPI("disk/yourapi")

i haven't checked but i believe this works
os.remove (filename)

That does not work, it is:

fs.delete(filename)
Xemiru #4
Posted 14 February 2012 - 01:11 AM
Thanks alot. :(/>/>
FuzzyPurp #5
Posted 14 February 2012 - 02:09 AM
in the shell you can type delete (filename)
redworks alias for delete is del