| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
>Is there a simple way to find the startup volume name? I can think of acouple of ways using Runtime.exec(): do "ls -l /Volumes" and see what links to /,
Or get a File.listFiles() of /Volumes in Java and call getCanonicalPath() on each File (optional: in a filter object). The one that resolves to "/" is the startup volume, and you can then use the uncanonical path (i.e. the pathname of the symlink) as desired.
This won't work before 10.4, which I think is when the "symlink to startup volume" first appeared. Or maybe it was 10.3. Anyway, if nothing canonicalizes to "/", I think you're stuck, if the pathname problem is that serious.
-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
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.