Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Finding startup volume name?



What's the best way to tackle the following problem?

A QuickTime URL dataref to a local file seems to need the volume name in it, so
file:///Users/rolf/Deskop/test.mov doesn't work, whereas
file:///Volumes/Macintosh%20HD/Users/rolf/Desktop/test.mov does work. They ought to be the same but they're not.


Is there a simple way to find the startup volume name? I can think of a couple of ways using Runtime.exec(): do "ls -l /Volumes" and see what links to /, or "osascript -e 'path to system folder'" and parse the output, but these seem a bit fragile. Is there a more direct way to find the volume name, or perhaps directly go from a POSIX path to a file: URL in such a way that it works in QuickTime?

One thing I'm worried about if I do it myself is whether the "standard" directory names are the same in other languages. Will they still be called /Users, /Volumes, /System, ~/Library/Preferences etc. if I choose French or Japanese as my language when installing Mac OS X?

-Rolf
--
Rolf Howarth
Square Box Systems Ltd
Stratford-upon-Avon UK.
http://www.squarebox.co.uk
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.