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

fs.makeDir()

Started by tfoote, 11 June 2012 - 12:12 AM
tfoote #1
Posted 11 June 2012 - 02:12 AM
When using fs.makeDir() where does the directory create? Can you access the directory from a different map?
MysticT #2
Posted 11 June 2012 - 02:20 AM
The directory is created inside the computer save dir (in ".minecraft/saves/<YourWorld>/computer/<ComputerID>" for ssp), and you can only access that directory from that computer in that map.
tfoote #3
Posted 11 June 2012 - 02:26 AM
ok! thank you. Can you access the directory from a different computer?
MysticT #4
Posted 11 June 2012 - 02:29 AM
… and you can only access that directory from that computer …
No, but you can copy it to a floppy and then to other computer.
tfoote #5
Posted 11 June 2012 - 02:30 AM
how do you copy a directory to a floppy?
kazagistar #6
Posted 11 June 2012 - 02:31 AM
No. Best you could do is make a program that allows remote access via rednet.
tfoote #7
Posted 11 June 2012 - 02:33 AM
HOW!!!
MysticT #8
Posted 11 June 2012 - 02:36 AM
To copy a file or directory from the shell, type in the terminal:
> cp <file/directory> /disk/<file/directory>
To do it from a program:

fs.copy("<file/directory>", "/disk/<file/directory>")

No. Best you could do is make a program that allows remote access via rednet.
It depends on what you need. If it's just a directoy with some programs, just copying it is easier. If you need access to a directory with files that will be changed by a program, and need other program (in other computer) to read those changes, it would be better to use rednet to share it.
tfoote #9
Posted 11 June 2012 - 02:37 AM
Thank you very Much