com.jdon.util
类 FileUtil

java.lang.Object
  继承者 com.jdon.util.FileUtil

public class FileUtil
extends Object


构造方法摘要
FileUtil()
           
 
方法摘要
static boolean copy(String input, String output)
          This class copies an input file to output file
static void CopyDir(String sourcedir, String destdir)
          This class copies an input files of a directory to another directory not include subdir
static void createFile(String output, String content)
          write the content to a file;
static void makehome(String home)
          create a directory
static void move(String input, String output)
          This class moves an input file to output file
static String readFile(String input)
          read the content from a file;
static void recursiveRemoveDir(File directory)
          This class del a directory recursively,that means delete all files and directorys.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

FileUtil

public FileUtil()
方法详细信息

createFile

public static void createFile(String output,
                              String content)
                       throws Exception
write the content to a file;

参数:
output -
content -
抛出:
Exception

readFile

public static String readFile(String input)
                       throws Exception
read the content from a file;

参数:
output -
content -
抛出:
Exception

move

public static void move(String input,
                        String output)
                 throws Exception
This class moves an input file to output file

参数:
String - input file to move from
String - output file
抛出:
Exception

copy

public static boolean copy(String input,
                           String output)
                    throws Exception
This class copies an input file to output file

参数:
String - input file to copy from
String - output file
抛出:
Exception

makehome

public static void makehome(String home)
                     throws Exception
create a directory

参数:
home -
抛出:
Exception

CopyDir

public static void CopyDir(String sourcedir,
                           String destdir)
                    throws Exception
This class copies an input files of a directory to another directory not include subdir

参数:
String - sourcedir the directory to copy from such as:/home/bqlr/images
String - destdir the target directory
抛出:
Exception

recursiveRemoveDir

public static void recursiveRemoveDir(File directory)
                               throws Exception
This class del a directory recursively,that means delete all files and directorys.

参数:
File - directory the directory that will be deleted.
抛出:
Exception


Copyright © 2013. All Rights Reserved.