Class File4


  • public class File4
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      File4()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void copy​(java.lang.String source, java.lang.String target)  
      static void copyFile​(java.io.File source, java.io.File target)  
      static void delete​(java.lang.String fname)  
      static boolean exists​(java.lang.String fname)  
      static void mkdirs​(java.lang.String path)  
      static byte[] readAllBytes​(java.lang.String fname)  
      static void rename​(java.lang.String oldPath, java.lang.String newPath)  
      static long size​(java.lang.String filePath)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • File4

        public File4()
    • Method Detail

      • readAllBytes

        public static byte[] readAllBytes​(java.lang.String fname)
                                   throws java.io.FileNotFoundException,
                                          java.io.IOException
        Throws:
        java.io.FileNotFoundException
        java.io.IOException
      • rename

        public static void rename​(java.lang.String oldPath,
                                  java.lang.String newPath)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • copy

        public static void copy​(java.lang.String source,
                                java.lang.String target)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • copyFile

        public static void copyFile​(java.io.File source,
                                    java.io.File target)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • delete

        public static void delete​(java.lang.String fname)
      • exists

        public static boolean exists​(java.lang.String fname)
      • mkdirs

        public static void mkdirs​(java.lang.String path)
      • size

        public static long size​(java.lang.String filePath)