org.apache.hadoop.fs
Class FileUtil

java.lang.Object
  extended byorg.apache.hadoop.fs.FileUtil

public class FileUtil
extends Object

A collection of file-processing util methods


Constructor Summary
FileUtil()
           
 
Method Summary
static boolean copy(File src, FileSystem dstFS, Path dst, boolean deleteSource, Configuration conf)
          Copy local files to a FileSystem.
static boolean copy(FileSystem srcFS, Path src, File dst, boolean deleteSource, Configuration conf)
          Copy FileSystem files to local files.
static boolean copy(FileSystem srcFS, Path src, FileSystem dstFS, Path dst, boolean deleteSource, Configuration conf)
          Copy files between FileSystems.
static boolean fullyDelete(File dir)
          Delete a directory and all its contents.
static boolean fullyDelete(File dir, Configuration conf)
          Deprecated. Call fullyDelete(File).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil

public FileUtil()
Method Detail

fullyDelete

public static boolean fullyDelete(File dir,
                                  Configuration conf)
                           throws IOException
Deprecated. Call fullyDelete(File).

Throws:
IOException

fullyDelete

public static boolean fullyDelete(File dir)
                           throws IOException
Delete a directory and all its contents. If we return false, the directory may be partially-deleted.

Throws:
IOException

copy

public static boolean copy(FileSystem srcFS,
                           Path src,
                           FileSystem dstFS,
                           Path dst,
                           boolean deleteSource,
                           Configuration conf)
                    throws IOException
Copy files between FileSystems.

Throws:
IOException

copy

public static boolean copy(File src,
                           FileSystem dstFS,
                           Path dst,
                           boolean deleteSource,
                           Configuration conf)
                    throws IOException
Copy local files to a FileSystem.

Throws:
IOException

copy

public static boolean copy(FileSystem srcFS,
                           Path src,
                           File dst,
                           boolean deleteSource,
                           Configuration conf)
                    throws IOException
Copy FileSystem files to local files.

Throws:
IOException


Copyright © 2006 The Apache Software Foundation