Mailing Lists: Apple Mailing Lists

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

Re: Disappearing files.



Greg Guerin wrote:
Don't use literal "/". Use File.separator, or better yet:

This is technically correct, of course, but I'm curious: are there any current Java 1.4+ platforms where / doesn't work? It's certainly valid, both at native level and in Java, on all three desktop platforms (OS X, Windows since 95, Linux/BSD/etc). Maybe there are some obscure ones?


Totally agree about checking the return value though - those functions are lethal. I wish Sun would change them - obviously they can't literally change them but they could deprecate them and make differently-named safe variants. (Maybe they already did in some newer version? I'm sticking with 1.5 for the moment... fingers crossed.)

(Other favourite evil file function: listFiles or whatever it's called. Returns null instead of empty array when there aren't any. Eeeeevil.)

--sam

_______________________________________________
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
References: 
 >Re: Disappearing files. (From: Greg Guerin <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.