Android File Delete findDeleteClasspathFile(String filename)

Here you can find the source of findDeleteClasspathFile(String filename)

Description

find Delete Classpath File

License

Open Source License

Declaration

public static void findDeleteClasspathFile(String filename) 

Method Source Code

/*//from w  ww .  ja v a2  s .  c o m
 * *************************************************************************************
 *  Copyright (C) 2008 EsperTech, Inc. All rights reserved.                            *
 *  http://esper.codehaus.org                                                          *
 *  http://www.espertech.com                                                           *
 *  ---------------------------------------------------------------------------------- *
 *  The software in this package is published under the terms of the GPL license       *
 *  a copy of which has been included with this distribution in the license.txt file.  *
 * *************************************************************************************
 */

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main{
    public static void findDeleteClasspathFile(String filename) {
        URL url = FileUtil.class.getClassLoader().getResource(filename);
        if (url != null) {
            File file = new File(url.getFile());
            file.delete();
        }
    }
}

Related

  1. deleteTempDir(File dir)
  2. deleteTempFile(File tmpFile)
  3. deleteTempFiles()
  4. delfile(String path)
  5. delfile(String path, String name)
  6. forceDelete(File file)
  7. forceDelete(File file)
  8. forceDelete(String file)
  9. forceDelete(final File file)