public void deleteFile(String p)
    {
        File f = new File(p);
        if (!f.exists()) {
            return;
        }
        
        if (f.isDirectory()) {
            File[] fl = f.listFiles();
            for (File file : fl) {
                if (file.isDirectory()) {
                    deleteFile(file.getAbsolutePath());
                }
                file.delete();
            }
        }
        f.delete();
    }