Java Delete File deleteFile(String f)

Here you can find the source of deleteFile(String f)

Description

delete File

License

Open Source License

Declaration

public static boolean deleteFile(String f) 

Method Source Code

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

import java.io.File;

public class Main {
    public static boolean deleteFile(String f) {
        boolean success = false;

        File fTarget = new File(f);
        if (fTarget.exists()) {
            success = fTarget.delete();/*  w ww  .  j  a  v  a2s .co  m*/
        }

        return success;
    }
}

Related

  1. deleteFile(final File file)
  2. deleteFile(final String dirname)
  3. deleteFile(Object fileObj)
  4. deleteFile(String archiveFilename)
  5. deleteFile(String dest)
  6. deleteFile(String file)
  7. deleteFile(String file)
  8. deleteFile(String file)
  9. deleteFile(String file)