Jump to content




How to write/read to physical hard drive?


  • You cannot reply to this topic
8 replies to this topic

#1 DELTA_12

  • Members
  • 4 posts

Posted 14 August 2015 - 07: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.

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 14 August 2015 - 09: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.

#3 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 14 August 2015 - 11:50 PM

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.

#4 DELTA_12

  • Members
  • 4 posts

Posted 15 August 2015 - 12:06 PM

I thought about that but the problem is that te save is server-side not singleplayer save

#5 cyanisaac

  • Members
  • 369 posts
  • LocationSan Diego, CA

Posted 16 August 2015 - 12:19 AM

Use pastebin put to store individual files on pastebin, then copy the pasted contents to a file. WHAZAMBOOSKIE YOU GOT YER FILES.

#6 HPWebcamAble

  • Members
  • 933 posts
  • LocationWeb Development

Posted 16 August 2015 - 01:19 AM

View PostDELTA_12, on 15 August 2015 - 12:06 PM, said:

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.

#7 Hydrotronics

  • Members
  • 131 posts
  • LocationThe hall of 1000 monkeys and only 1 typewriter

Posted 18 August 2015 - 04:11 PM

View Postcyanisaac, on 16 August 2015 - 12:19 AM, said:

...WHAZAMBOOSKIE YOU GOT YER FILES.
sorry I just found that really funny XD

#8 powerboat9

  • Members
  • 42 posts

Posted 20 August 2015 - 12: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.co...h?v=AKuzQpZhhHo)

#9 powerboat9

  • Members
  • 42 posts

Posted 20 August 2015 - 05:43 PM

*computercraft computer





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users