Posted 27 September 2012 - 07:33 PM
Hello there,
I've downloaded the newest ComputerCraft a while ago and changed the disk sizes of computer and floppies to 0 (unlimited).
Since that I'm not able to use fs.copy() and fs.move() since it will return "copy:13:Copy failed.". Therefore the commands "cp" and "mv" also not working any more! But when you changing disk sizes to a value > 0 then it is working again! :P/>/>
I also found a workaround :D/>/> :
Since you are able to create, read and write files without problems, you can read the whole source file into a string variable and then write it into your destination file to copy it. For example:
ComputerCraft version: v1.42 (rev 680)
Forge version: 3.1.15.378
I've downloaded the newest ComputerCraft a while ago and changed the disk sizes of computer and floppies to 0 (unlimited).
Since that I'm not able to use fs.copy() and fs.move() since it will return "copy:13:Copy failed.". Therefore the commands "cp" and "mv" also not working any more! But when you changing disk sizes to a value > 0 then it is working again! :P/>/>
I also found a workaround :D/>/> :
Since you are able to create, read and write files without problems, you can read the whole source file into a string variable and then write it into your destination file to copy it. For example:
function copy(source, destination)
--Open source and destination
s = fs.open(source, "r")
d = fs.open(destination, "w")
--Read whole file
local content = s.readAll()
--Write into destination
d.write(content)
--Close files
s.close()
d.close()
end
function move(source, destination)
copy(source, destination)
fs.delete(source)
end
ComputerCraft version: v1.42 (rev 680)
Forge version: 3.1.15.378