Here you can find the source of deleteDataFiles(final Collection
Parameter | Description |
---|---|
paths | a parameter |
Parameter | Description |
---|
public static void deleteDataFiles(final Collection<String> paths) throws IOException
//package com.java2s; import java.io.File; import java.io.IOException; import java.util.Collection; public class Main { /**/*from w w w .j a v a 2 s.c o m*/ * Delete all files from collection of paths in String format. * @param paths * @throws java.io.IOException */ public static void deleteDataFiles(final Collection<String> paths) throws IOException { for (String path : paths) { File file = new File(path); if (file.exists()) { file.delete(); } else { throw new IOException("Failed to delete folowing data file :\n" + file.getPath()); } } } }