java - Remove files using a unix-like pattern -


I want to do something similar to Unix command 'rm foo *' using Java. Obviously, I want this multi-platform. I know that this filename can be done using the filter class and file .delete () method, but I was thinking that I could execute this simple operation in less verbose manner.

Thanks in advance.

look for org.apache.commons.io.filefilter.WildcardFileFilter in Commons-IO.

> No more, sorry, even if it is verbatim, it is not much less speaking than that. Groovy and skala are good choices if you want to write a short script.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

jquery - SimpleModal Confirm fails to submit form -