sis.util.IOUtil


 package sis.util; import java.io.*; public class IOUtil {    public static boolean delete(String... filenames) {       boolean deletedAll = true;       for (String filename: filenames)          if (!new File(filename).delete())             deletedAll = false;       return deletedAll;    } } 

The delete method uses varargs to allow you to delete multiple files in a single method call. It returns true only if all files were successfully deleted.



Agile Java. Crafting Code with Test-Driven Development
Agile Javaв„ў: Crafting Code with Test-Driven Development
ISBN: 0131482394
EAN: 2147483647
Year: 2003
Pages: 391
Authors: Jeff Langr

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net