public class MemoryFileSystem extends Object implements FileSystem, ResourceReader, ResourceStore
| Constructor and Description |
|---|
MemoryFileSystem() |
public Folder getRootFolder()
getRootFolder in interface FileSystempublic File getFile(Path path)
getFile in interface FileSystempublic Collection<String> getFileNames()
getFileNames in interface ResourceReaderpublic File getFile(String path)
getFile in interface FileSystempublic Folder getFolder(Path path)
getFolder in interface FileSystempublic Folder getFolder(String path)
getFolder in interface FileSystempublic byte[] getFileContents(MemoryFile file)
public void setFileContents(MemoryFile file, byte[] contents) throws IOException
IOExceptionpublic void mark()
mark in interface ResourceReaderpublic Collection<String> getModifiedResourcesSinceLastMark()
getModifiedResourcesSinceLastMark in interface ResourceReaderpublic boolean existsFolder(MemoryFolder folder)
public boolean existsFolder(String path)
public boolean existsFile(String path)
public void createFolder(MemoryFolder folder)
public boolean remove(Folder folder)
remove in interface FileSystempublic boolean remove(File file)
remove in interface FileSystempublic int copyFolder(Folder srcFolder, MemoryFileSystem trgMfs, Folder trgFolder, String... filters)
public void printFs(PrintStream out)
public void printFs(Folder f, PrintStream out)
public boolean isAvailable(String pResourceName)
isAvailable in interface ResourceReaderpublic byte[] getBytes(String pResourceName)
getBytes in interface ResourceReaderpublic void write(String pResourceName, byte[] pResourceData)
write in interface ResourceStorepublic void write(String pResourceName, byte[] pResourceData, boolean createFolder)
write in interface ResourceStorepublic byte[] read(String pResourceName)
read in interface ResourceStorepublic void remove(String pResourceName)
remove in interface ResourceStorepublic byte[] writeAsBytes()
public void writeAsFs(File file)
public static MemoryFileSystem readFromJar(File jarFile)
public static MemoryFileSystem readFromJar(byte[] jarFile)
public static MemoryFileSystem readFromJar(InputStream jarFile)
public String findPomProperties()
public MemoryFileSystem clone()
Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.