Package org.apache.commons.vfs

Examples of org.apache.commons.vfs.FileSystemManager

@author Adam Murdoch

    }

    @Override
    public void put(String content, String remoteFilePath) {
        try {
            FileSystemManager vfsManager = VFS.getManager();

            // remoteFilePath = remoteFilePath.replace("dav://", "webdav://");
            WebdavFileObject remoteFile = (WebdavFileObject) vfsManager
                    .resolveFile(remoteFilePath.replace("dav://", "webdav://"));

            PrintStream printer = new PrintStream(remoteFile.getOutputStream());
            printer.println(content);
            printer.close();
View Full Code Here


   */
  public static String[] retrieveCommunication(String path, ServerPrimitives primitive, String... items) {
    String [] returnValues =  new String[items.length];
    WebdavFileObject response  = null;

    FileSystemManager vfsManager = WebDAVClientManager.getVFSManager();

    try {
      //control if .response arrive..
      while((response == null || !response.exists())){
        LOGGER.debug("webdav path: " + path.replace("dav", "webdav") + "/.response");
        if(response == null) LOGGER.debug("response == null");
        LOGGER.debug("path: " + path);
        if(vfsManager == null) LOGGER.debug("vfsManager == null");
        response = (WebdavFileObject) vfsManager.resolveFile(path.replace("dav", "webdav") + "/.response");
      }
    } catch (FileSystemException fsException) {
      LOGGER.error(fsException.getMessage());
    }
    try {
View Full Code Here

TOP

Related Classes of org.apache.commons.vfs.FileSystemManager

Copyright © 2018 www.massapicom. 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.