@Test(expected = IOException.class) public void testTar_getFile_invalidPath() throws IOException { final File testTgz = TestUtil.getTestFile("tgz/test-archive.tar"); virtualDir = new VirtualDirTgz(testTgz); virtualDir.getFile("test-archive/invalid_dir/missing.file"); }
@Override public File getFile(String path) throws IOException { ensureUnpacked(); final File file = new File(extractDir, path); if (!(file.isFile() || file.isDirectory())) { throw new IOException(); } return file; }
VirtualDirTgz extends VirtualDir { @Override public File getFile(String path) throws IOException { ensureUnpacked(); final File file = new File(extractDir, path); if (!(file.isFile() || file.isDirectory())) { throw new IOException(); } return file; } }
VirtualDirTgz extends VirtualDir { @Override public File getFile(String path) throws IOException { ensureUnpacked(); final File file = new File(extractDir, path); if (!(file.isFile() || file.isDirectory())) { throw new IOException(); } return file; } VirtualDirTgz(File tgz); }
VirtualDirTgz extends VirtualDir { @Override public File getFile(String path) throws IOException { ensureUnpacked(); final File file = new File(extractDir, path); if (!(file.isFile() || file.isDirectory())) { throw new IOException(); } return file; } VirtualDirTgz(File tgz); @Override String getBasePath(); @Override File getBaseFile(); @Override InputStream getInputStream(String path); @Override File getFile(String path); @Override String[] list(String path); @Override boolean exists(String path); @Override String[] listAllFiles(); @Override void close(); @Override boolean isCompressed(); @Override boolean isArchive(); @Override void finalize(); @Override File getTempDir(); }
VirtualDirTgz extends VirtualDir { @Override public File getFile(String path) throws IOException { ensureUnpacked(); final File file = new File(extractDir, path); if (!(file.isFile() || file.isDirectory())) { throw new IOException(); } return file; } VirtualDirTgz(File tgz); @Override String getBasePath(); @Override File getBaseFile(); @Override InputStream getInputStream(String path); @Override File getFile(String path); @Override String[] list(String path); @Override boolean exists(String path); @Override String[] listAllFiles(); @Override void close(); @Override boolean isCompressed(); @Override boolean isArchive(); @Override void finalize(); @Override File getTempDir();  }