Re: Deleting multiple files?

<depstein-6g8wRflRTwWrN/MWgto1swC/[email protected]> Mon, 8 Nov 2010 13:30:13 +0300
Newsgroups gmane.comp.java.smartfrog.user
Message-ID <29F36C7C98AB09499B1A209D48EAA615B4FF7AD03B@mail2a.alliedtesting.com>
> -----Original Message-----
> From: Steve Loughran [mailto:[email protected]]
> Sent: Monday, November 01, 2010 5:31 PM
> To: Dmitry Epstein
> Cc: smartfrog-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Subject: Re: [Smartfrog-users] Deleting multiple files?
> 
> 
> >
> > Yes, I was aware of SelfDeletingFile. I was thinking of perhaps
> adding deleteOnExit attribute to the Files component, or patching
> together a new component, based on Files.
> >
> 
> OK. I'm just checking in a DeleteFile component that does the delete
> operation but is more helpful on a failure, even security exceptions
> are
> caught and turned into errors.
> 
> I also had a quick scan and cleanup of the test of that code, again
> checking it in as we speak. Looking at that code, the target for
> modification would be to subclass FilesCompoundImpl and have a child
> DeleteFiles which would call FilesCompoundImpl.sfStart(), take that
> list
> of files and do a best effort attempt at deleting them, tracking which
> ones couldn't be deleted and adding that up to some results which could
> be reported or turned into an error.

Speaking of files, a useful workflow component would be one that iterates over a list of files, i.e. performs a parameterized execution of its action sub-component, where the parameter is a path-name from a Files component.

Or perhaps a more general component that iterates over any given vector, with a child component specifically for files.

I know this would be useful for my test designs.

Dmitry

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev