Package org.jboss.virtual

Examples of org.jboss.virtual.VirtualFile.cleanup()


         File test = new File(tempRoot, "jar1.jar" + '_' + seed);
         assertTrue(test.exists()); // should be created by MockTS
      }
      finally
      {
         temp.cleanup();
      }
   }

   public void testNestedZip() throws Throwable
   {
View Full Code Here


            File test = new File(tempRoot, "complex.jar" + '_' + seed);
            assertTrue(test.exists()); // should be created by MockTS
         }
         finally
         {
            file.cleanup();
         }
      }
      finally
      {
         store.clear();
View Full Code Here

   protected void deleteTempDir() throws IOException
   {
      // use vfs to disable possible reaper
      VirtualFile td = VFS.getRoot(tempDir.toURI());
      td.cleanup();
      td.delete();
   }

   protected void assertTempFiles(int size) throws Exception
   {
View Full Code Here

      VirtualFile nestedChild = child.getChild("child");
      assertNotNull(nestedChild);

      assertTempFiles(1);

      nestedChild.cleanup();
      assertRegistryEntryExists(nestedChild.toURI());

      root.cleanup();

      assertTempFiles(0);
View Full Code Here

      assertNotNull(copy);
      assertTrue(VFSUtils.isTemporaryFile(copy));

      assertCopyMechanismFiles(1);

      copy.cleanup();

      assertCopyMechanismFiles(0);

      root.cleanup();
      assertNoRegistryEntry(root.toURI());
View Full Code Here

      {
         // Delete any expanded war
         VirtualFile warFile = unit.getAttachment("org.jboss.web.expandedWarFile", VirtualFile.class);
         if (warFile != null)
         {
            warFile.cleanup(); // it's temp, it will be deleted as well
         }
      }
      catch (Exception e)
      {
         log.debug("Failed to remove expanded war", e);
View Full Code Here

         {
            assertTrue("Should be temp", VFSUtils.isTemporaryFile(file));
         }
         finally
         {
            file.cleanup();
         }
      }
      finally
      {
         main.undeploy(deployment);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.