On 1/6/10 3:31 PM, Richard Gaskin wrote:
tsj wrote:
Richard - I haven't got an unnamed USB drive handy to test this with but
what does the volumes function return when one is mounted? Does this give
you the expected "untitled" (or "untitled 1" etc)?

If so, you could iterate through the listed volumes using a couple of
applescripts to determine whether the drive was local (false if it's a
network drive) ejectable (false if it's internal) and then if you get two false results you can attempt to open a file on the volume. If that gives you an error then the drive is write protected. If it passes all tests then
you're left (presumably) with an external USB or Firewire drive.

The "passes all tests" list can also includes mounted .dmg files.

Thanks for posting this - very helpful.
--
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to