Re: [The Java Posse] File.separator question

2010-12-30 Thread B Smith-Mannschott
naaah... interface MySuperDuperConstants { public static final char SLASHY_THINGY = File.separatorChar; public static final String SLASHY_STRINGY_THINGY = File.separator; } class MyExcellentApp implements MySuperDuperConstants { // TODO: make baby jesus cry ... } narf! ;-) // Ben 2010/1

Re: [The Java Posse] File.separator question

2010-12-29 Thread Cédric Beust ♔
Just because it works on all OS today doesn't mean it will always be the case. For example, just over the past few years, two operating systems have emerged with "novel" ways of viewing the file system (Android and iOS). I don't think hardcoding '/' instead of using File.separatorChar is worth th

[The Java Posse] File.separator question

2010-12-29 Thread phil swenson
I find code that uses the "File.separator" field irritating. It makes the code uglier and best I can tell "/" works everywhere, including windows. Does anyone know if there is a reason to use File.separator instead of just "/"? My guess is unless you are writing java code that writes to a .bat f