Java File Exist isFileExist(File file)

Here you can find the source of isFileExist(File file)

Description

is File Exist

License

Open Source License

Declaration

public static boolean isFileExist(File file) 

Method Source Code


//package com.java2s;

import java.io.File;

public class Main {
    public static boolean isFileExist(File file) {
        return file.exists();
    }/*from w  ww. ja va 2 s. c o m*/

    public static boolean isFileExist(File file, File folder) {
        // File[] files = folder.listFiles();
        // String fileName = file.getName();
        // for( File f : files )
        // {
        // if( fileName.equals( f.getName() ) )
        // {
        // return true;
        // }
        // }
        // return false;
        return file.exists();
    }
}

Related

  1. fileExistsAndCanRead(final String filePath)
  2. fileExistsAndIsExecutable(String filePathString)
  3. fileExistsAndReadable(String file)
  4. fileExistsAndReadable(String sourcePath)
  5. FileExistsNotEmpty(String filename)
  6. isFileExist(File file, File folder)
  7. isFileExist(final String filePathString)
  8. isFileExist(String assetDestinationLocation, String id, String assetId)
  9. isFileExist(String file)