类 FileUtils


  • public class FileUtils
    extends java.lang.Object
    从以下版本开始:
    3.5.0
    另请参阅:
    org.apache.commons.io.FileUtils
    • 构造器概要

      构造器 
      构造器 说明
      FileUtils()  
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static void forceMkdir​(java.io.File directory)
      Makes a directory, including any necessary but nonexistent parent directories.
      static void forceMkdirParent​(java.io.File file)
      Makes any necessary but nonexistent parent directories for a given File.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • FileUtils

        public FileUtils()
    • 方法详细资料

      • forceMkdir

        public static void forceMkdir​(java.io.File directory)
                               throws java.io.IOException
        Makes a directory, including any necessary but nonexistent parent directories. If a file already exists with specified name but it is not a directory then an IOException is thrown. If the directory cannot be created (or does not already exist) then an IOException is thrown.
        参数:
        directory - directory to create, must not be null
        抛出:
        java.lang.NullPointerException - if the directory is null
        java.io.IOException - if the directory cannot be created or the file already exists but is not a directory
      • forceMkdirParent

        public static void forceMkdirParent​(java.io.File file)
                                     throws java.io.IOException
        Makes any necessary but nonexistent parent directories for a given File. If the parent directory cannot be created then an IOException is thrown.
        参数:
        file - file with parent to create, must not be null
        抛出:
        java.lang.NullPointerException - if the file is null
        java.io.IOException - if the parent directory cannot be created
        从以下版本开始:
        2.5