Class FileUtils


  • public class FileUtils
    extends java.lang.Object
    The Class FileUtils.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static boolean STATUS_ERROR
      The Constant STATUS_ERROR.
      static boolean STATUS_OK
      The Constant STATUS_OK.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean delete​(java.io.File file, java.lang.StringBuffer logBuffer)
      Delete.
      static java.util.List<java.lang.String> list​(java.lang.String strDirPath, java.lang.String strFileExtension)
      List.
      static java.util.List<java.lang.String> list​(java.lang.String strDirPath, java.lang.String strFileExtension, boolean bRecursive)
      List.
      static java.lang.String readFile​(java.lang.String strFilePath)
      Read file.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • STATUS_OK

        public static final boolean STATUS_OK
        The Constant STATUS_OK.
        See Also:
        Constant Field Values
      • STATUS_ERROR

        public static final boolean STATUS_ERROR
        The Constant STATUS_ERROR.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FileUtils

        public FileUtils()
    • Method Detail

      • delete

        public static boolean delete​(java.io.File file,
                                     java.lang.StringBuffer logBuffer)
        Delete.
        Parameters:
        file - the file
        logBuffer - the log buffer
        Returns:
        true, if successful
      • readFile

        public static java.lang.String readFile​(java.lang.String strFilePath)
        Read file.
        Parameters:
        strFilePath - the str file path
        Returns:
        the string
      • list

        public static java.util.List<java.lang.String> list​(java.lang.String strDirPath,
                                                            java.lang.String strFileExtension)
        List.
        Parameters:
        strDirPath - the str dir path
        strFileExtension - the str file extension
        Returns:
        the list
      • list

        public static java.util.List<java.lang.String> list​(java.lang.String strDirPath,
                                                            java.lang.String strFileExtension,
                                                            boolean bRecursive)
        List.
        Parameters:
        strDirPath - the str dir path
        strFileExtension - the str file extension
        bRecursive - the b recursive
        Returns:
        the list