Class SymlinkTreeMergeStep

  • All Implemented Interfaces:

    public class SymlinkTreeMergeStep
    extends Object
    implements Step
    A step to merge the contents of provided directories into a symlink tree
    • Constructor Detail

      • SymlinkTreeMergeStep

        public SymlinkTreeMergeStep​(String category,
                                    ProjectFilesystem filesystem,
                                    Path root,
                                    SymlinkPaths links,
                                    java.util.function.BiFunction<ProjectFilesystem,​Path,​Boolean> deleteExistingLinkPredicate)
        Creates an instance of SymlinkTreeMergeStep
        category - The type of link tree that will be used. This is used in the name
        filesystem - The filesystem that the root resides on
        root - The root of the link tree
        links - A map of relative paths within the link tree into which files from the value will be recursively linked. e.g. if a file at /tmp/foo/bar should be linked as /tmp/symlink-root/subdir/bar, the map should contain {Paths.get("subdir"),
        deleteExistingLinkPredicate - A predicate that, given an existing filesystem and target of an existing symlink, can return 'true' if the original link should be deleted. This is used in the case that there are conflicting files when merging links into root. A common example is dummy files placed by PythonInPlaceBinary which may be deleted safely in the destination directory if one of the other directories being merged has a file with some substance.