Re: Deleting multiple files?

Steve Loughran <[email protected]> Mon, 01 Nov 2010 13:20:59 +0000
Newsgroups gmane.comp.java.smartfrog.user
Message-ID <[email protected]>
On 01/11/10 10:43, depstein-6g8wRflRTwWrN/MWgto1swC/[email protected] wrote:
>
>
> Hi,
>
> I would like to delete multiple files, using a pattern. This seems like
> a common enough action, but I can=92t figure out how to do it with
> standard components.
>

That's an interesting thought, I've just run over the source code to see =

what we do there.

Summary: we have components that delete entire directories, both the =

Tempdir and Mkdir components can do this when being terminated, and =

that's all we've needed.

That said, DeleteFile and DeleteDir components would be useful in some =

situations, so I've added two bugreps

http://jira.smartfrog.org/jira/browse/SFOS-1541
http://jira.smartfrog.org/jira/browse/SFOS-1542

Deleting a single file is easy, the directory one not so hard, once you =

get into patterns it gets tricky, so don't hold your breath waiting for =

that feature.

What you can do right now is use the Ant components and just use Ant's =

Delete task, give it the pattern. Be aware that Ant's code ignores SCM =

paths (like .svn, .cvs, .git) etc, and its copy logic checks source and =

destination times by default -features you want at build time but which =

interfere during deployments


-steve

---------------------------------------------------------------------------=
---
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store =

http://p.sf.net/sfu/nokia-dev2dev