org.openqa.selenium.internal
Class FileHandler
java.lang.Object
org.openqa.selenium.internal.FileHandler
public class FileHandler
- extends java.lang.Object
Utility methods for common filesystem activities
|
Method Summary |
static void |
copy(java.io.File from,
java.io.File to)
|
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 java.io.File |
locateInProject(java.lang.String path)
Locates a file in the current project |
static boolean |
makeWritable(java.io.File file)
|
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 |
FileHandler
public FileHandler()
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
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
locateInProject
public static java.io.File locateInProject(java.lang.String path)
- Locates a file in the current project
- Parameters:
path - path to file to locate from root of project
- Returns:
- file being saught, if it exists
- Throws:
WebDriverException - wrapped FileNotFoundException if file could
not be found
Copyright © 2010. All Rights Reserved.