/** * Examine if path represents a regular file. If the OS/JRE supports * symbolic links the test returns false if path represents a symbolic link. * * @param path * a {@link java.io.File} object. * @return true if path represents a regular file * @since 3.0 */ public boolean isFile(File path) { return FileUtils.isFile(path); }
/** * Whether the given file can be executed. * * @param file * a {@link java.io.File} object. * @return {@code true} if the given file can be executed. * @since 4.1 */ public static boolean canExecute(File file) { if (!isFile(file)) { return false; } return Files.isExecutable(file.toPath()); }
/** * Examine if path represents a regular file. If the OS/JRE supports * symbolic links the test returns false if path represents a symbolic link. * * @param path * @return true if path represents a regular file * @since 3.0 */ public boolean isFile(File path) { return FileUtils.isFile(path); }
/** * Examine if path represents a regular file. If the OS/JRE supports * symbolic links the test returns false if path represents a symbolic link. * * @param path * a {@link java.io.File} object. * @return true if path represents a regular file * @since 3.0 */ public boolean isFile(File path) { return FileUtils.isFile(path); }
/** * @param path * @return {@code true} if the given file is a file * @deprecated Use * {@link Files#isRegularFile(java.nio.file.Path, java.nio.file.LinkOption...)} * instead */ @Deprecated public static boolean isFile(File path) { return FileUtils.isFile(path); }
/** * @param file * @return {@code true} if the given file can be executed * @since 4.1 */ public static boolean canExecute(File file) { if (!isFile(file)) { return false; } return Files.isExecutable(file.toPath()); }
/** * Whether the given file can be executed. * * @param file * a {@link java.io.File} object. * @return {@code true} if the given file can be executed. * @since 4.1 */ public static boolean canExecute(File file) { if (!isFile(file)) { return false; } return Files.isExecutable(file.toPath()); }