Re: Different behavior of Directory.fieldLength()

2010-03-13 Thread Michael McCandless
Thanks! Mike On Sat, Mar 13, 2010 at 9:10 AM, Shai Erera wrote: > Ok, opened LUCENE-2316 to track this. > > Shai > > On Sat, Mar 13, 2010 at 3:49 PM, Michael McCandless > wrote: >> >> I like the proposed new semantics (throw FNFE if the file does not >> exist), and the migration path (new metho

Re: Different behavior of Directory.fieldLength()

2010-03-13 Thread Shai Erera
Ok, opened LUCENE-2316 to track this. Shai On Sat, Mar 13, 2010 at 3:49 PM, Michael McCandless < luc...@mikemccandless.com> wrote: > I like the proposed new semantics (throw FNFE if the file does not > exist), and the migration path (new method, deprecate old). > > Mike > > On Sat, Mar 13, 2010

Re: Different behavior of Directory.fieldLength()

2010-03-13 Thread Michael McCandless
I like the proposed new semantics (throw FNFE if the file does not exist), and the migration path (new method, deprecate old). Mike On Sat, Mar 13, 2010 at 7:46 AM, Shai Erera wrote: > I think it falls under the semantics of dir.fileLength() and not the > semantics of the implementation right? U

Re: Different behavior of Directory.fieldLength()

2010-03-13 Thread Shai Erera
I think it falls under the semantics of dir.fileLength() and not the semantics of the implementation right? Unfortunately, the semantics of Directory.fileLength() are not specified, which made it easy for extensions to invent their own. I myself am not sure what's better - return 0 as the length f

Re: Different behavior of Directory.fieldLength()

2010-03-13 Thread Marcelo Ochoa
Uwe: > That is not true, the API says: > "Creates a new File *instance* from a parent pathname string and a child > pathname string." > > Please note "instance", so it will never create the file on disk. New File() > just creates a file instance but no file on disk. You can check this with a > s

RE: Different behavior of Directory.fieldLength()

2010-03-13 Thread Uwe Schindler
That is not true, the API says: "Creates a new File *instance* from a parent pathname string and a child pathname string." Please note "instance", so it will never create the file on disk. New File() just creates a file instance but no file on disk. You can check this with a simple test. Uwe