/** * Creates a local copy of the file, and all its descendants. * * @param srcFile The file to copy. * @param selector The FileSelector. * @return the created File. * @throws FileSystemException if an error occurs copying the file. */ @Override public File replicateFile(final FileObject srcFile, final FileSelector selector) throws FileSystemException { final String basename = srcFile.getName().getBaseName(); final File file = allocateFile(basename); // Copy from the source file final FileObject destFile = getContext().toFileObject(file); destFile.copyFrom(srcFile, selector); return file; } }
/** * Creates a local copy of the file, and all its descendants. * * @param srcFile The file to copy. * @param selector The FileSelector. * @return the created File. * @throws FileSystemException if an error occurs copying the file. */ @Override public File replicateFile(final FileObject srcFile, final FileSelector selector) throws FileSystemException { final String basename = srcFile.getName().getBaseName(); final File file = allocateFile(basename); // Copy from the source file final FileObject destFile = getContext().toFileObject(file); destFile.copyFrom(srcFile, selector); return file; } }
/** * Creates a local copy of the file, and all its descendants. * * @param srcFile The file to copy. * @param selector The FileSelector. * @return the created File. * @throws FileSystemException if an error occurs copying the file. */ @Override public File replicateFile(final FileObject srcFile, final FileSelector selector) throws FileSystemException { final String basename = srcFile.getName().getBaseName(); final File file = allocateFile(basename); // Copy from the source file final FileObject destFile = getContext().toFileObject(file); destFile.copyFrom(srcFile, selector); return file; } }
/** * Creates a local copy of the file, and all its descendants. * * @param srcFile The file to copy. * @param selector The FileSelector. * @return the created File. * @throws FileSystemException if an error occurs copying the file. */ @Override public File replicateFile(final FileObject srcFile, final FileSelector selector) throws FileSystemException { final String basename = srcFile.getName().getBaseName(); final File file = allocateFile(basename); // Copy from the source file final FileObject destFile = getContext().toFileObject(file); destFile.copyFrom(srcFile, selector); return file; } }