org.eclipse.jgit.api
Class CleanCommand
java.lang.Object
org.eclipse.jgit.api.GitCommand<Set<String>>
org.eclipse.jgit.api.CleanCommand
- All Implemented Interfaces:
- Callable<Set<String>>
public class CleanCommand
- extends GitCommand<Set<String>>
Remove untracked files from the working tree
- See Also:
- Git documentation about Clean
Method Summary |
Set<String> |
call()
Executes the clean command with all the options and parameters
collected by the setter methods of this class. |
CleanCommand |
setDryRun(boolean dryRun)
If dryRun is set, the paths in question will not actually be deleted. |
CleanCommand |
setPaths(Set<String> paths)
If paths are set, only these paths are affected by the cleaning. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CleanCommand
protected CleanCommand(Repository repo)
- Parameters:
repo
-
call
public Set<String> call()
throws NoWorkTreeException,
GitAPIException
- Executes the
clean
command with all the options and parameters
collected by the setter methods of this class. Each instance of this
class should only be used for one invocation of the command (means: one
call to call()
)
- Specified by:
call
in interface Callable<Set<String>>
- Specified by:
call
in class GitCommand<Set<String>>
- Returns:
- a set of strings representing each file cleaned.
- Throws:
GitAPIException
NoWorkTreeException
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
- 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
Copyright © 2012. All Rights Reserved.