public class MemoryFileSystem extends Object implements FileSystem, ResourceReader, Serializable, ResourceStore
Constructor and Description |
---|
MemoryFileSystem() |
public Folder getRootFolder()
getRootFolder
in interface FileSystem
public File getFile(Path path)
getFile
in interface FileSystem
public Collection<String> getFileNames()
getFileNames
in interface ResourceReader
public File getFile(String path)
getFile
in interface FileSystem
public Folder getFolder(Path path)
getFolder
in interface FileSystem
public Folder getFolder(String path)
getFolder
in interface FileSystem
public byte[] getFileContents(MemoryFile file)
public void setFileContents(MemoryFile file, byte[] contents) throws IOException
IOException
public void mark()
mark
in interface ResourceReader
public Collection<String> getModifiedResourcesSinceLastMark()
getModifiedResourcesSinceLastMark
in interface ResourceReader
public 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 FileSystem
public boolean remove(File file)
remove
in interface FileSystem
public 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 ResourceReader
public byte[] getBytes(String pResourceName)
getBytes
in interface ResourceReader
public void write(String pResourceName, byte[] pResourceData)
write
in interface ResourceStore
public void write(String pResourceName, byte[] pResourceData, boolean createFolder)
write
in interface ResourceStore
public byte[] read(String pResourceName)
read
in interface ResourceStore
public void remove(String pResourceName)
remove
in interface ResourceStore
public 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.