Java File Path Delete deleteFile(final String dirPath, final String fileName)

Here you can find the source of deleteFile(final String dirPath, final String fileName)

Description

delete File

License

Apache License

Declaration

public static boolean deleteFile(final String dirPath, final String fileName) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.File;

public class Main {

    public static boolean deleteFile(final String dirPath, final String fileName) {
        boolean ifDel = false;
        final File file = new File(dirPath + "/" + fileName);
        if (file.exists()) {
            ifDel = file.delete();/*from  w  w  w  .j ava2  s .c  om*/
        }
        return ifDel;
    }
}

Related

  1. deleteEmptyDir(File dstPath)
  2. deleteEmptyParents(final File path)
  3. deleteFile(File path)
  4. deleteFile(File path)
  5. deleteFile(File path)
  6. deleteFile(final String filePathName)
  7. DeleteFile(String _filePath)
  8. deletefile(String delpath)
  9. deleteFile(String filePath)