Package net.thucydides.core.resources
Class FileResources
java.lang.Object
net.thucydides.core.resources.FileResources
public class FileResources
extends java.lang.Object
Utility class used to copy resources from a classpath to a target directory.
-
Constructor Summary
Constructors Modifier Constructor Description protectedFileResources(java.lang.String resourceDirectoryRoot) -
Method Summary
Modifier and Type Method Description voidcopyResourceTo(java.lang.String sourceResource, java.io.File targetDirectory)protected java.io.FileOutputStreamcreateOutputStream(java.io.File destinationFile)java.lang.StringfindTargetFileFrom(java.lang.String sourceResource)java.lang.StringfindTargetSubdirectoryFrom(java.lang.String sourceResource)static FileResourcesfrom(java.lang.String resourceDirectoryRoot)static longgetDefaultRetryTimeout()java.lang.StringstripLeadingSeparatorFrom(java.lang.String path)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
FileResources
protected FileResources(java.lang.String resourceDirectoryRoot)
-
-
Method Details
-
from
-
findTargetSubdirectoryFrom
public final java.lang.String findTargetSubdirectoryFrom(java.lang.String sourceResource) -
stripLeadingSeparatorFrom
public final java.lang.String stripLeadingSeparatorFrom(java.lang.String path) -
findTargetFileFrom
public final java.lang.String findTargetFileFrom(java.lang.String sourceResource) -
copyResourceTo
public final void copyResourceTo(java.lang.String sourceResource, java.io.File targetDirectory) throws java.io.IOException- Throws:
java.io.IOException
-
getDefaultRetryTimeout
public static long getDefaultRetryTimeout() -
createOutputStream
protected java.io.FileOutputStream createOutputStream(java.io.File destinationFile) throws java.io.FileNotFoundException- Throws:
java.io.FileNotFoundException
-