List of usage examples for org.apache.commons.vfs.impl DefaultFileSystemManager getTemporaryFileStore
public TemporaryFileStore getTemporaryFileStore() throws FileSystemException
From source file:org.sonatype.gshell.vfs.provider.truezip.TruezipFileObject.java
/** * Attaches this file object to its file resource. *//*from w w w . j a v a2s .c o m*/ protected void doAttach() throws Exception { if (file == null) { LayeredFileName layeredFileName = (LayeredFileName) getName(); String fileName = layeredFileName.getOuterName().getRootURI() + layeredFileName.getOuterName().getPathDecoded(); FileObject outer = getFileSystem().resolveFile(fileName); if (outer instanceof TruezipFileObject) { fileName = layeredFileName.getOuterName().getPathDecoded() + getName().getPathDecoded(); file = new File(fileName, ArchiveDetector.ALL); } else { fileObject = outer; DefaultFileSystemManager dfsMgr = (DefaultFileSystemManager) VFS.getManager(); file = new File(dfsMgr.getTemporaryFileStore().allocateFile(getName().getBaseName())); } } }