question: public static boolean isFileExist ( String filePath , FileType fileType , boolean performFileCheck ) throws IOException { filePath = filePath . replace ( "\\" , "/" ) ; switch ( fileType ) { case HDFS : case VIEWFS : Path path = new Path ( filePath ) ; FileSystem fs = path . getFileSystem ( configuration ) ; if ( performFileCheck ) { return fs . exists ( path ) && fs . isFile ( path ) ; } else { return fs . exists ( path ) ; } case LOCAL : default : File defaultFile = new File ( filePath ) ; if ( performFileCheck ) { return defaultFile . exists ( ) && defaultFile . isFile ( ) ; } else { return defaultFile . exists ( ) ; } } }
target:  This method checks the given path exists or not and also is it file or not if the performFileCheck is true