Finding the flexi discs otwarzacz

Hello again. Today at work I had a problem with Flex. I needed to find otwarzacz discs. Finding generally all the available disks is not much of a problem, but the flex is in no way indicates which of them is otwarzacz, returns only available disk arrays. Well, and here is the proverbial "buba". I managed to find a rather "interesting" solution namely the attempt to save and delete a file / directory on each disk, which has asked us to flex. And now if we can not do that, it is probably otwarzacz discs. Here it is, however, that if the odwarzaczu not find some kind of a flex plate does not return us to the drive ...

var file: File = new File (); var drives: File.getRootDirectories = Array ();
var CDROMs: Array = new Array ();

for (var i: int = 0; i <drives.length i + +)
(
var file: File = new File ();

file = file.resolvePath (drives [and]. nativePath + "\ \ t");

try
(
file.createDirectory ();
file.deleteDirectory ();
)
catch (error: IOError)
(
cdroms.push (drives [i]);
)
)

Leave a Comment

Please note: Comment moderation is enabled and May delay your comment. There is no need to resubmit your comment.