Jump to content




Filesystems


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

#1 tenshae

  • Members
  • 66 posts

Posted 15 October 2014 - 08:00 PM

This doesn't have to do with coding--well, kinda--but no one is clear about if such a question is against the rules. It is Computercraft related though!

I wanted to know how the computercraft mod implements it's virtual filesystem. (e.g.: the /rom mount)
This is something I've been investigating for quite a long time but no one seems to have an answer!
Thanks again.

#2 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 15 October 2014 - 10:41 PM

I think that's done java-side. However, the lua docs are available if you want to look through them: https://github.com/a...mputercraftLua.

#3 tenshae

  • Members
  • 66 posts

Posted 15 October 2014 - 11:48 PM

View PostKingofGamesYami, on 15 October 2014 - 10:41 PM, said:

I think that's done java-side. However, the lua docs are available if you want to look through them: https://github.com/a...mputercraftLua.
Oh, I know it's done java-side. I was just wondering if someone had any knowledge of how, exactly, it accomplishes it.

#4 natedogith1

  • Members
  • 110 posts

Posted 16 October 2014 - 01:28 AM

Computer Craft's file system is just your actual computer's file system. If your looking for the Java class that's used to access the real computer's file system, I believe you're looking for java.io.File

#5 tenshae

  • Members
  • 66 posts

Posted 16 October 2014 - 01:51 AM

View Postnatedogith1, on 16 October 2014 - 01:28 AM, said:

Computer Craft's file system is just your actual computer's file system. If your looking for the Java class that's used to access the real computer's file system, I believe you're looking for java.io.File
You seem to misunderstand me. I know this, but I want to know how it handles things like the "/rom" mount, which is virtual.

#6 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 16 October 2014 - 02:03 AM

So, you want the actual java code they use to mount the /rom? In that case, I have no idea, I don't know Java. (yet)

#7 ElvishJerricco

  • Members
  • 803 posts

Posted 16 October 2014 - 02:09 AM

Take a look at the API for CC. There's an interface called IMount. An addon can create virtual mounts like /rom using IMount.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users