Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
get drive names on mac — Gideros Forum

get drive names on mac

keszeghkeszegh Member
edited June 2022 in General questions
i've been using this code on windows to get drive list, but it turns out that it returns false on mac. as i do not have a mac, it is hard to experiment, can somebody help me with a correct code?:
    local disks = {}
    for i = 65, 90 do
      local letter = string.char(i)
      local att = lfs.attributes(letter..":/.")
      if att then local data={} data.name=letter..":" table.insert(disks, data) end
    end
    rootnames=(#disks > 0 and disks)
    return rootnames
Tagged:

Comments

Sign In or Register to comment.