Java File Path Delete delete(String fileNameWithFullPath)

Here you can find the source of delete(String fileNameWithFullPath)

Description

Deletes a File from an url.

License

Open Source License

Declaration


public static boolean delete(String fileNameWithFullPath) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.File;

public class Main {
    /**//  www .  java  2  s  . co m
     * Deletes a File Object.
     */
    public static File delete(File file) {
        file.delete();
        return file;
    }

    /**
     * Deletes a File from an url.
     */

    public static boolean delete(String fileNameWithFullPath) {
        File file = new File(fileNameWithFullPath);
        return file.delete();
    }
}

Related

  1. delete(File path)
  2. delete(File path)
  3. delete(File path)
  4. delete(File path, String... exclude)
  5. delete(final File path)
  6. delete(String filePath)
  7. delete(String filePath)
  8. delete(String filePath)
  9. delete(String filePath)