Class CleanCommand

    • Constructor Detail

      • CleanCommand

        protected CleanCommand​(Repository repo)
        Constructor for CleanCommand
        Parameters:
        repo - the Repository
    • Method Detail

      • setPaths

        public CleanCommand setPaths​(Set<String> paths)
        If paths are set, only these paths are affected by the cleaning.
        Parameters:
        paths - the paths to set (with / as separator)
        Returns:
        this
      • setDryRun

        public CleanCommand setDryRun​(boolean dryRun)
        If dryRun is set, the paths in question will not actually be deleted.
        Parameters:
        dryRun - whether to do a dry run or not
        Returns:
        this
      • setForce

        public CleanCommand setForce​(boolean force)
        If force is set, directories that are git repositories will also be deleted.
        Parameters:
        force - whether or not to delete git repositories
        Returns:
        this
        Since:
        4.5
      • setCleanDirectories

        public CleanCommand setCleanDirectories​(boolean dirs)
        If dirs is set, in addition to files, also clean directories.
        Parameters:
        dirs - whether to clean directories too, or only files.
        Returns:
        this
      • setIgnore

        public CleanCommand setIgnore​(boolean ignore)
        If ignore is set, don't report/clean files/directories that are ignored by a .gitignore. otherwise do handle them.
        Parameters:
        ignore - whether to respect .gitignore or not.
        Returns:
        this