Package net.sourceforge.pebble.domain

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


    View view = action.process(request, response);

    // check file was saved and the right view is returned
    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");
  }
View Full Code Here


    FileManager fileManager = new FileManager(blog, type);
    FileMetaData file = fileManager.getFileMetaData(path, name);
    FileMetaData parent = fileManager.getParent(file);

    try {
      String content = fileManager.loadFile(path, name);
      getModel().put("fileContent", content);
    } 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.