public class ClasspathFileSource extends java.lang.Object implements FileSource
| Constructor and Description |
|---|
ClasspathFileSource(java.lang.String path) |
| Modifier and Type | Method and Description |
|---|---|
FileSource |
child(java.lang.String subDirectoryName) |
void |
createIfNecessary() |
void |
deleteFile(java.lang.String name) |
boolean |
exists() |
BinaryFile |
getBinaryFileNamed(java.lang.String name) |
java.lang.String |
getPath() |
TextFile |
getTextFileNamed(java.lang.String name) |
java.net.URI |
getUri() |
java.util.List<TextFile> |
listFilesRecursively() |
void |
writeBinaryFile(java.lang.String name,
byte[] contents) |
void |
writeTextFile(java.lang.String name,
java.lang.String contents) |
public BinaryFile getBinaryFileNamed(java.lang.String name)
getBinaryFileNamed in interface FileSourcepublic TextFile getTextFileNamed(java.lang.String name)
getTextFileNamed in interface FileSourcepublic void createIfNecessary()
createIfNecessary in interface FileSourcepublic FileSource child(java.lang.String subDirectoryName)
child in interface FileSourcepublic java.lang.String getPath()
getPath in interface FileSourcepublic java.net.URI getUri()
getUri in interface FileSourcepublic java.util.List<TextFile> listFilesRecursively()
listFilesRecursively in interface FileSourcepublic void writeTextFile(java.lang.String name,
java.lang.String contents)
writeTextFile in interface FileSourcepublic void writeBinaryFile(java.lang.String name,
byte[] contents)
writeBinaryFile in interface FileSourcepublic boolean exists()
exists in interface FileSourcepublic void deleteFile(java.lang.String name)
deleteFile in interface FileSource