This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
How to write/read to physical hard drive?
Started by DELTA_12, 14 August 2015 - 06:07 PMPosted 14 August 2015 - 08:07 PM
Hello, i've been writing complex programs lately in CC and i was trying to make an API that could copy programs from your physical computer hard drive into the virtual pc in game and vice versa. Basically i want to read and write data to a file in my physical pc. Would that be possible? Thank you for any answers.
Posted 14 August 2015 - 10:18 PM
The computers' "hard drives" are folders on your physical hard drive, but computers cannot read or write to any files outside of their individual folder.
Posted 15 August 2015 - 12:50 AM
That is to say, go the other way around - have the programs on your "real" computer access the "virtual" computer's stuff directly.
Locate your worldsave and check inside the "computers" folder there.
Locate your worldsave and check inside the "computers" folder there.
Posted 15 August 2015 - 01:06 PM
I thought about that but the problem is that te save is server-side not singleplayer save
Posted 16 August 2015 - 01:19 AM
Use pastebin put to store individual files on pastebin, then copy the pasted contents to a file. WHAZAMBOOSKIE YOU GOT YER FILES.
Posted 16 August 2015 - 02:19 AM
I thought about that but the problem is that te save is server-side not singleplayer save
Which is why CC doesn't allow you to do this - you'd be able to access a server's files, from your computer, through minecraft!
You can use pastebin though, like cyanisaac suggested. That's probably the best solution.
Posted 18 August 2015 - 05:11 PM
sorry I just found that really funny XD…WHAZAMBOOSKIE YOU GOT YER FILES.
Posted 20 August 2015 - 01:34 PM
You could probably create a symlink to the root directory (/ on Linux, C:\\ on Windows) and copy it to your computer (another person made this video: https://m.youtube.com/watch?v=AKuzQpZhhHo)
Posted 20 August 2015 - 06:43 PM
*computercraft computer