Examples of containsFile()


Examples of com.adito.extensions.ExtensionDescriptor.containsFile()

    ExtensionDescriptor app = ExtensionStore.getInstance().getExtensionDescriptor(application);

    if (app == null)
      app = ExtensionStore.getInstance().getAgentApplication();

    if (!app.containsFile(file)) {
      log.error("Agent requested a file that does not exist (" + file + ").");
      sendError(file + " not found", response);
    } else {
      sendFile(app.getFile(file), response);
    }
View Full Code Here

Examples of com.adito.extensions.ExtensionDescriptor.containsFile()

      }

      launchSession.checkAccessRights(null, agent.getSession());

      ExtensionDescriptor descriptor = ExtensionStore.getInstance().getExtensionDescriptor(name);
      if (!descriptor.containsFile(filename))
        throw new ChannelOpenException(ChannelOpenException.CHANNEL_REFUSED, "Application does not contain file " + filename + " in extension " + name);

      this.file = descriptor.getFile(filename);
      this.in = new FileInputStream(file);
View Full Code Here

Examples of com.google.opengse.io.FileCollection.containsFile()

    FileCollection fileCollection = getClasspathAsFileCollection();
    FileCollection jdkFileCollection = JDKFileCollection.getFileCollection();
    Set<String> packages = new TreeSet<String>();
    for (String filename : fileCollection.getFileNames()) {
      if (filename.endsWith(CLASS_SUFFIX)) {
        if (!jdkFileCollection.containsFile(filename)) {
          filename = filename
              .substring(0, filename.length() - CLASS_SUFFIX.length());
          String classname = filename.replace(File.separatorChar, '.');
          String pkg = getPackage(classname);
          packages.add(pkg);
View Full Code Here

Examples of org.bladerunnerjs.model.engine.Node.containsFile()

  @Test
  public void containsFileShouldNotThrowAnExceptionIfDirIsNull()
  {
    Node node = new TestNode(mockRootNode, null, null);
   
    assertFalse(node.containsFile("some-file.txt"));
  }
 
  @Test
  public void containsFileShouldReturnTrueIfTheFileExists()
  {
View Full Code Here

Examples of org.bladerunnerjs.model.engine.Node.containsFile()

  @Test
  public void containsFileShouldReturnTrueIfTheFileExists()
  {
    Node node = new TestNode(mockRootNode, null, new File(TEST_DIR));
   
    assertTrue(node.containsFile("some-file.txt"));
  }
 
  @Test
  public void containsFileShouldReturnFalseIfTheFileDoesNotExist()
  {
View Full Code Here

Examples of org.bladerunnerjs.model.engine.Node.containsFile()

  @Test
  public void containsFileShouldReturnFalseIfTheFileDoesNotExist()
  {
    Node node = new TestNode(mockRootNode, null, new File(TEST_DIR));
   
    assertFalse(node.containsFile("non-existent-file.txt"));
  }
 
  @Test
  public void validDirNamesCanBeCheckedBeforehand() throws Exception {
    TestRootNode rootNode = new TestRootNode(new File(TEST_DIR, "brjs-root-node"));
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.