From: Samuele P. <pe...@in...> - 2000-11-09 15:02:58
|
Hi. Really just a detail. [Finn Bock] > I think it would be better to let the File() ctor create and handle the > aspect of relative files. I.e. > > if (dirName.length() == 0) > dirName = null; > File dir = new File(dirName, name); > > It is not well defined, what will happen if the dirName == "", but a > null directory value will create a relative file. Reading the sun docs: http://java.sun.com/j2se/1.3/docs/api/java/io/File.html#File(java.lang.String, java.lang.String) The contrary seems true, at least for java2. So that "" is the right choice to get a "rel" dir. But my fear is really for java1.1 and the Macs. The old sun jdk1.1 doc is mostly unclear. regards, Samuele |