FileResolver createFileResolver(FileLookup lookup) { return lookup.getFileResolver(); }
Factory<PatternSet> createPatternSetFactory() { return fileLookup.getFileResolver().getPatternSetFactory(); } };
private FileCopyAction getCopyVisitor(File destination) { return new FileCopyAction(fileLookup.getFileResolver(destination)); }
@Override protected CopyAction createCopyAction() { File destinationDir = getDestinationDir(); if (destinationDir == null) { throw new InvalidUserDataException("No copy destination directory has been specified, use 'into' to specify a target directory."); } return new FileCopyAction(getFileLookup().getFileResolver(destinationDir)); }
@Override protected CopyAction createCopyAction() { File destinationDir = getDestinationDir(); if (destinationDir == null) { throw new InvalidUserDataException("No copy destination directory has been specified, use 'into' to specify a target directory."); } return new SyncCopyActionDecorator(destinationDir, new FileCopyAction(getFileLookup().getFileResolver(destinationDir)), preserveInDestination, getDirectoryFileTreeFactory()); }
@Override public void init(final Object target, ServiceRegistry services) { super.init(target, services); this.__scriptServices = services; loggingManager = services.get(LoggingManager.class); Instantiator instantiator = services.get(Instantiator.class); FileLookup fileLookup = services.get(FileLookup.class); DirectoryFileTreeFactory directoryFileTreeFactory = services.get(DirectoryFileTreeFactory.class); StreamHasher streamHasher = services.get(StreamHasher.class); FileHasher fileHasher = services.get(FileHasher.class); if (target instanceof FileOperations) { fileOperations = (FileOperations) target; } else { File sourceFile = getScriptSource().getResource().getLocation().getFile(); if (sourceFile != null) { fileOperations = new DefaultFileOperations(fileLookup.getFileResolver(sourceFile.getParentFile()), null, null, instantiator, fileLookup, directoryFileTreeFactory, streamHasher, fileHasher); } else { fileOperations = new DefaultFileOperations(fileLookup.getFileResolver(), null, null, instantiator, fileLookup, directoryFileTreeFactory, streamHasher, fileHasher); } } processOperations = (ProcessOperations) fileOperations; providerFactory = services.get(ProviderFactory.class); }