Examples of AllFileSelector


Examples of org.apache.commons.vfs.AllFileSelector

    }
   
    public static void copyFile(FileObject fromFile, FileObject toFile) throws FileSystemException
    {
        copyFolder(fromFile.getParent(), toFile.getParent());
        toFile.copyFrom(fromFile, new AllFileSelector());
        updateLastModified(toFile, fromFile);
        updateLastModified(toFile.getParent(), fromFile.getParent());
    }
View Full Code Here

Examples of org.apache.commons.vfs.AllFileSelector

  }
 
 
  private static Resources findResources(FileObject rootDir, String inputEncoding) throws IOException {
    Resources result = new Resources();
    FileObject[] allFiles = rootDir.findFiles(new AllFileSelector());
    for(int i = 0; i < allFiles.length; i++) {
      FileObject file = allFiles[i];
      if (file.getType() == FileType.FOLDER) {
        continue;
      }
View Full Code Here

Examples of org.apache.commons.vfs.AllFileSelector

        if (url.toExternalForm().startsWith("vfs")) {
            FileObject to = VFS.getManager().resolveFile(url.toExternalForm());
            File tmpFile = File.createTempFile("xxFilexx", ".json");
            FileUtils.writeStringToFile(tmpFile, json);
            FileObject from = VFS.getManager().toFileObject(tmpFile);
            to.copyFrom(from, new AllFileSelector());
            FileUtils.deleteQuietly(tmpFile);
        } else {
            FileUtils.writeStringToFile(FileUtils.toFile(url), json);
        }
    }
View Full Code Here

Examples of org.apache.commons.vfs.AllFileSelector

            source = manager.createFileSystem(source);
        }
        FileObject target = manager.createVirtualFileSystem(manager.resolveFile(targetFolder
                .getAbsolutePath()));

        FileSelector selector = new AllFileSelector() {
            @Override
            public boolean includeFile(FileSelectInfo fileInfo) {
                LOGGER.fine("Uncompressing " + fileInfo.getFile().getName().getFriendlyURI());
                return true;
            }
View Full Code Here

Examples of org.apache.commons.vfs.AllFileSelector

                    .resolveFile(remoteFilePath.replace("dav://", "webdav://"));

            FileObject localFile = vfsManager.resolveFile("file://"
                    + localFilePath);

            localFile.copyFrom(remoteFile, new AllFileSelector());
        } catch (FileSystemException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of org.apache.commons.vfs.AllFileSelector

                    + localFilePath);

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

            remoteFile.copyFrom(localFile, new AllFileSelector());
        } catch (FileSystemException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of org.apache.commons.vfs.AllFileSelector

   
   
    LOGGER.debug("Download file from server to client. " + webDAVFilePath + "->" + correctLocalFilePath);
   
    try {
      to.copyFrom(from, new AllFileSelector());
    } catch (FileSystemException e) {
      LOGGER.error("Error during download process",e);
    }   
  } 
View Full Code Here

Examples of org.apache.commons.vfs.AllFileSelector

    }

    LOGGER.debug("Upload file from client to server. " + correctLocalFileSystemPath + "->" + webDAVFilePath);
   
    try {
      to.copyFrom(from, new AllFileSelector());
    } catch (FileSystemException e) {
      LOGGER.error("Error during download process",e);
    }   
  }
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.