AirTip: List all of your drives in AIR application
Thursday, August 28th, 2008If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
Table of contents for air-tip
This is quick Air Tip: If you need get list of all of your drives in code, just use
var list:Array = File.getRootDirectories();
It list all of y our hard drives with CD ROM drives. But if CD is inserted in CD ROM drive, it will be listed as well. I don’t find way how to find out if drive is CD ROM drive, you can just search for files on that inserted CD.
If there is a way how to find out, if drive is CD ROM drive, let us know






1 Comments
sHTiF
• Visit Site
September 13th, 2008
I run into this problem of detecting a CD drive just a little ago and there really is no “normal” way to detect it but i found a little trick that will do the job. Its simple i try to create a file on each of the root directories and then delete em, if this creation fails i am assuming its a CD drive (or a drive that is disabled for writing in other way) it proved really usefull
Live Preview
Leave a comment