org.openqa.selenium.io
Class FileHandler
java.lang.Object
org.openqa.selenium.io.FileHandler
public class FileHandler
- extends 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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileHandler
public FileHandler()
unzip
public static File unzip(InputStream resource)
throws IOException
- Throws:
IOException
copyResource
public static void copyResource(File outputDir,
Class<?> forClassLoader,
String... names)
throws IOException
- Throws:
IOException
createDir
public static boolean createDir(File dir)
throws IOException
- Throws:
IOException
makeWritable
public static boolean makeWritable(File file)
throws IOException
- Throws:
IOException
makeExecutable
public static boolean makeExecutable(File file)
throws IOException
- Throws:
IOException
canExecute
public static Boolean canExecute(File file)
isZipped
public static boolean isZipped(String fileName)
delete
public static boolean delete(File toDelete)
copy
public static void copy(File from,
File to)
throws IOException
- Throws:
IOException
copy
public static void copy(File source,
File dest,
String suffix)
throws IOException
- Throws:
IOException
readAsString
public static String readAsString(File toRead)
throws IOException
- Throws:
IOException
Copyright © 2013. All Rights Reserved.