Class FileHelper


  • public final class FileHelper
    extends Object
    Provide useful method to manage file.
    • Constructor Detail

      • FileHelper

        public FileHelper()
    • Method Detail

      • getDirectory

        public static File getDirectory​(File f)
        Get the directory part of the specified file path.
        Parameters:
        f - File to process.
        Returns:
        The directory path from the specified
      • copyFile

        public static void copyFile​(File in,
                                    File out)
                             throws IOException
        Copy a file.
        Parameters:
        in - The source file.
        out - The target location.
        Throws:
        IOException - If an I/O error occur.
      • getFilename

        public static String getFilename​(File file)
        Get file name from the specified File object.