org.openqa.selenium.io
Class FileHandler

java.lang.Object
  extended by org.openqa.selenium.io.FileHandler

public class FileHandler
extends java.lang.Object

Utility methods for common filesystem activities


Nested Class Summary
static interface FileHandler.Filter
          Used by file operations to determine whether or not to make use of a file.
 
Constructor Summary
FileHandler()
           
 
Method Summary
static void copy(java.io.File from, java.io.File to)
           
static void copy(java.io.File source, java.io.File dest, java.lang.String suffix)
           
static void copyResource(java.io.File outputDir, java.lang.Class<?> forClassLoader, java.lang.String... names)
           
static boolean createDir(java.io.File dir)
           
static boolean delete(java.io.File toDelete)
           
static boolean isZipped(java.lang.String fileName)
           
static boolean makeExecutable(java.io.File file)
           
static boolean makeWritable(java.io.File file)
           
static java.lang.String readAsString(java.io.File toRead)
           
static java.io.File unzip(java.io.InputStream resource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileHandler

public FileHandler()
Method Detail

unzip

public static java.io.File unzip(java.io.InputStream resource)
                          throws java.io.IOException
Throws:
java.io.IOException

copyResource

public static void copyResource(java.io.File outputDir,
                                java.lang.Class<?> forClassLoader,
                                java.lang.String... names)
                         throws java.io.IOException
Throws:
java.io.IOException

createDir

public static boolean createDir(java.io.File dir)
                         throws java.io.IOException
Throws:
java.io.IOException

makeWritable

public static boolean makeWritable(java.io.File file)
                            throws java.io.IOException
Throws:
java.io.IOException

makeExecutable

public static boolean makeExecutable(java.io.File file)
                              throws java.io.IOException
Throws:
java.io.IOException

isZipped

public static boolean isZipped(java.lang.String fileName)

delete

public static boolean delete(java.io.File toDelete)

copy

public static void copy(java.io.File from,
                        java.io.File to)
                 throws java.io.IOException
Throws:
java.io.IOException

copy

public static void copy(java.io.File source,
                        java.io.File dest,
                        java.lang.String suffix)
                 throws java.io.IOException
Throws:
java.io.IOException

readAsString

public static java.lang.String readAsString(java.io.File toRead)
                                     throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2011. All Rights Reserved.