Posted 09 April 2012 - 09:15 AM
A function that reads a file to a data table compatible with bit API or a way to read a string with out the computer correcting unknown symbols into "question marks".
reasons why
1) Cant really call a program a FTP if it can only handle test/lua files
2) encrypted files would be corrupted when sent over rednet by auto correction.
3) file compression like zip would be able to be used over rednet
I was going to post this in bugs as file.readAll() causes this but further research made me release it was reacting correctly from a string perspective in correcting the supposed errors.
the bellow program will demonstrate how files are altered on read by file.readAll() witch is the only way to read a file in the context of rednet messaging. As fs.copy only works locally
Instructions
place both test.lua and pic.png in the root of a computer.
run test.lua
http://www.filefactory.com/file/5darm4i55gl5/n/test_zip
reasons why
1) Cant really call a program a FTP if it can only handle test/lua files
2) encrypted files would be corrupted when sent over rednet by auto correction.
3) file compression like zip would be able to be used over rednet
I was going to post this in bugs as file.readAll() causes this but further research made me release it was reacting correctly from a string perspective in correcting the supposed errors.
the bellow program will demonstrate how files are altered on read by file.readAll() witch is the only way to read a file in the context of rednet messaging. As fs.copy only works locally
Instructions
place both test.lua and pic.png in the root of a computer.
run test.lua
http://www.filefactory.com/file/5darm4i55gl5/n/test_zip