I definitely agree that the task should log a
message when you try to delete a file or directory that doesn't exist, but I
don't think it should cause an exception.
The delete task should only fail when the file or
directory that you specified can't be deleted.
I propose the following attributes (which, more of
less, correspond with the attributes/properties of the Ant version of the Delete
task) :
As you can see, the proposed behaviour will, by
default, display a diagnotistic message when you try to delete a file or
directory that doesn't exist.
I everyone agrees, I'll try to post a patch for
this tomorrow.
Gert
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 19, 2003 8:07
PM
Subject: Re: [nant-dev] Delete task
behaviour > Gert: > > >If something that you specify doesn't even exist, the delete task should > >consider it tasks done. > > Then change my property idea to allow a warning to be emitted. (say verbose > ="true" or warn_if_missing="true") While I agree the task will be happy > that directory is not there, Gerry has a valid point that this could be the > source of a frustrating and hard to find bug in your script. > > Best, > Bill > > William E. Caputo > ThoughtWorks, Inc. > -------- > It is impossible to design a system so perfect that no one needs to be > good. -- T.S. Eliot > > > > > > "Gert Driesen" > <gert.driesen@pan To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> > dora.be> cc: <[EMAIL PROTECTED]>, > <[EMAIL PROTECTED]> > 02/19/2003 01:00 Subject: Re: [nant-dev] Delete task behaviour > PM > > > > > > > We should put the logic where it belopngs, the delete task should only make > sure that it's removed whatever you specify ... > > If something that you specify doesn't even exist, the delete task should > consider it tasks done. > > Just my 2 cents. > > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: "Gert Driesen" <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: Wednesday, February 19, 2003 7:17 PM > Subject: Re: [nant-dev] Delete task behaviour > > > > > > Gerry: > > ><delete dir="f00"/> > > > > >The delete task will not raise an error and your directory foo will not > > >exist. > > > > I liked the feature that Gert suggested, but I see Gerry's point. What > > about this: > > > > Add an attribute, say "ignore_failures" (name open to suggestions!) that > > toggles the behavior described: > > > > <delete ignore_failures="false" dir="f00" /> > > > > Gert's scenario could be accomplished thusly: > > <delete ignore_failures="true" dir="foo" /> <!-- if foo doesn't exist, > we> will consider that a success --> > > > > IMO giving people the power to do what they want (with options that they > > can ignore if they aren't ready for them) is a more useful approach than > > simply having or not having a feature. > > > > Whichever scenario is the more common, would be the default (or the > current > > behavior could be the default) > > > > Does that address your concern Gerry? > > > > Best, > > Bill > > > > William E. Caputo > > ThoughtWorks, Inc. > > -------- > > It is impossible to design a system so perfect that no one needs to be > > good. -- T.S. Eliot > > > > > > > > > > > > > > > > > |
- Re: [nant-dev] Delete task behaviour Gert . Driesen
- Re: [nant-dev] Delete task behaviour WECaputo
- Re: [nant-dev] Delete task behaviour Gert Driesen
- Re: [nant-dev] Delete task behaviour Ian MacLean
- Re: [nant-dev] Delete task behaviour Gerry Shaw
- Re: [nant-dev] Delete task behaviour Gert . Driesen
- Re: [nant-dev] Delete task behaviour WECaputo
- [nant-dev] Delete task patch Gert Driesen
- [nant-dev] Delete task patch Gert Driesen
- Re: [nant-dev] Delete task behaviour WECaputo
- Re: Re: [nant-dev] Delete task behaviour [EMAIL PROTECTED]
- Re: [nant-dev] Delete task behaviour Ian MacLean
- RE: [nant-dev] Delete task behaviour Simon Steele
- Re: [nant-dev] Delete task behaviour Ian MacLean
- Re: Re: [nant-dev] Delete task behaviour [EMAIL PROTECTED]
- Re: [nant-dev] Delete task behaviour Ian MacLean
- Re: Re: [nant-dev] Delete task behaviour [EMAIL PROTECTED]
- RE: Re: [nant-dev] Delete task behaviour Brian Deacon