Package net.sourceforge.pebble.domain

Examples of net.sourceforge.pebble.domain.FileManager.deleteFile()


    assertEquals("y.txt", file.getName());
    assertEquals("/", file.getPath());
    assertFalse(file.isDirectory());

    // and clean up
    fileManager.deleteFile("/", "a");
    fileManager.deleteFile("/", "z");
    fileManager.deleteFile("/", "y.txt");
    fileManager.deleteFile("/", "b.txt");
  }
View Full Code Here


    assertEquals("/", file.getPath());
    assertFalse(file.isDirectory());

    // and clean up
    fileManager.deleteFile("/", "a");
    fileManager.deleteFile("/", "z");
    fileManager.deleteFile("/", "y.txt");
    fileManager.deleteFile("/", "b.txt");
  }

  /**
 
View Full Code Here

    assertFalse(file.isDirectory());

    // and clean up
    fileManager.deleteFile("/", "a");
    fileManager.deleteFile("/", "z");
    fileManager.deleteFile("/", "y.txt");
    fileManager.deleteFile("/", "b.txt");
  }

  /**
   * Tests that files can be accessed, even when the path isn't specified.
View Full Code Here

    // and clean up
    fileManager.deleteFile("/", "a");
    fileManager.deleteFile("/", "z");
    fileManager.deleteFile("/", "y.txt");
    fileManager.deleteFile("/", "b.txt");
  }

  /**
   * Tests that files can be accessed, even when the path isn't specified.
   */
 
View Full Code Here

    assertEquals("a.txt", file.getName());
    assertEquals("/", file.getPath());
    assertFalse(file.isDirectory());

    // and clean up
    fileManager.deleteFile("/", "a.txt");
  }

  /**
   * Tests that the upload action is set correctly for blog images.
   */
 
View Full Code Here

    FileManager fileManager = new FileManager(blog, FileMetaData.BLOG_FILE);
    assertEquals("Some content.", fileManager.loadFile("/", "afile.txt"));
    assertTrue(view instanceof ForwardView);

    // and clean up
    fileManager.deleteFile("/", "afile.txt");
  }

  /**
   * Tests that a file can't be saved outside of the root.
   */
 
View Full Code Here

        try {
          fileManager.deleteFile(path, name);

          // if it's a theme file, also delete the copy in blog.dir/theme
          if (type.equals(FileMetaData.THEME_FILE)) {
            themeFileManager.deleteFile("/theme" + path, name);
          }

          blog.info("File \"" + StringUtils.transformHTML(name) + "\" removed.");
        } catch (IllegalFileAccessException e) {
          return new ForbiddenView();
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.