Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
DIES

How to check the filesystem is Hard Disk Drive?

Question

When I run this code in EEPROM it gives me one excess Filesystem, but I have no hard disks attached, wtf :/

dev_info = computer.getDeviceInfo()

__DrivesCount = 0
for k, v in pairs(dev_info) do
    if v.class == "volume" or v.class == "disk" then
        __DrivesCount = __DrivesCount + 1

        writeScroll("Auto-Detecting SATA "..__DrivesCount.."..."..v.description)
    end
end

 

Screenshot_187.png

Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
15 hours ago, Fingercomp said:

EEPROM does not have any file systems. It's not actually a file system. What is reported is most likely a tmpfs component. Use component.tmpAddress() == k to determine if it's a temporary file system.

Thank you. The only thing was wrong that you said component.- but it was computer.-

if k == computer.tmpAddress() then else
    ...
end

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.