Class AbstractFileSource
java.lang.Object
com.github.tomakehurst.wiremock.common.AbstractFileSource
- All Implemented Interfaces:
FileSource
- Direct Known Subclasses:
ServletContextFileSource
,SingleRootFileSource
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.common.base.Predicate<BinaryFile>
byFileExtension
(String extension) void
void
deleteFile
(String name) boolean
exists()
getBinaryFileNamed
(String name) getPath()
getTextFileNamed
(String name) getUri()
protected abstract boolean
readOnly()
void
writeBinaryFile
(String name, byte[] contents) void
writeTextFile
(String name, String contents) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.github.tomakehurst.wiremock.common.FileSource
child
-
Field Details
-
rootDirectory
-
-
Constructor Details
-
AbstractFileSource
-
-
Method Details
-
readOnly
protected abstract boolean readOnly() -
getBinaryFileNamed
- Specified by:
getBinaryFileNamed
in interfaceFileSource
-
getTextFileNamed
- Specified by:
getTextFileNamed
in interfaceFileSource
-
createIfNecessary
public void createIfNecessary()- Specified by:
createIfNecessary
in interfaceFileSource
-
getPath
- Specified by:
getPath
in interfaceFileSource
-
getUri
- Specified by:
getUri
in interfaceFileSource
-
listFilesRecursively
- Specified by:
listFilesRecursively
in interfaceFileSource
-
writeTextFile
- Specified by:
writeTextFile
in interfaceFileSource
-
writeBinaryFile
- Specified by:
writeBinaryFile
in interfaceFileSource
-
deleteFile
- Specified by:
deleteFile
in interfaceFileSource
-
exists
public boolean exists()- Specified by:
exists
in interfaceFileSource
-
byFileExtension
-