commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rami.oja...@elisa.fi
Subject Re: [vfs] FileObject.delete
Date Thu, 03 Jun 2004 13:20:04 GMT

> This will be done AFTER the children are removed, just to check if the 
> folder is really empty before deleting it.
> I think the indention was to check if any other process created a file 
> within the folder structure - and thus to avoid a error message during 
> recursive delete.

Not really. Think if you have structure

dir1
   dir1.1
      a.txt
   dir1.2
      b.txt

Then calling [FileObject:dir1].delete()
would not have deleted it's children.
Because that is not the intention of this invocation.
Further if you would have FilePattern selector **/*/b.txt
Then dir1.1 would not be empty when trying to delete it

> 
> >Then delete(FileSelector) could return the amount of files it deleted.
> >  
> >
> I already implemented a simple boolean, if you think this is not enough, 
> please tell me !
> I have had no time to checkin my changes as i have to write a test-case 
> too, but you could expect it soon.

I think it is common (for example in JDBC) to return so called delete count.
I don't need this change but it is more like suggestion for improvement.
And I don't think there is any hurry :)
I can also send you a patch if that would help you.
But maybe it is the writing of the test case that seems cumbersome.

I tried to run the test cases but it did not seem to work.
To me it seemed like build.xml was not running any of the tests.
And when I changed it I got some errors and was discouraged to write
test cases. So what is needed would be some kind of instructions
of how to write and run succesfully junit tests.

-- Rami


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message