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

How to write/read to physical hard drive?

Started by DELTA_12, 14 August 2015 - 06:07 PM
DELTA_12 #1
Posted 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.
Lyqyd #2
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.
Bomb Bloke #3
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.
DELTA_12 #4
Posted 15 August 2015 - 01:06 PM
I thought about that but the problem is that te save is server-side not singleplayer save
cyanisaac #5
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.
HPWebcamAble #6
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.
Hydrotronics #7
Posted 18 August 2015 - 05:11 PM
…WHAZAMBOOSKIE YOU GOT YER FILES.
sorry I just found that really funny XD
powerboat9 #8
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)
powerboat9 #9
Posted 20 August 2015 - 06:43 PM
*computercraft computer