| org.apache.tools.ant.Task org.apache.tools.ant.taskdefs.Patch
Patch | public class Patch extends Task (Code) | | Patches a file by applying a 'diff' file to it; requires "patch" to be
on the execution path.
since: Ant 1.1 |
Method Summary | |
public void | execute() | public void | setBackups(boolean backups) | public void | setDestfile(File file) The name of a file to send the output to, instead of patching
the file(s) in place; optional. | public void | setDir(File directory) The directory to run the patch command in, defaults to the
project's base directory. | public void | setIgnorewhitespace(boolean ignore) | public void | setOriginalfile(File file) | public void | setPatchfile(File file) The file containing the diff output; required. | public void | setQuiet(boolean q) | public void | setReverse(boolean r) | public void | setStrip(int num) Strip the smallest prefix containing num leading slashes
from filenames. |
setBackups | public void setBackups(boolean backups)(Code) | | flag to create backups; optional, default=false
Parameters: backups - if true create backups |
setDestfile | public void setDestfile(File file)(Code) | | The name of a file to send the output to, instead of patching
the file(s) in place; optional.
Parameters: file - the file to send the output to since: Ant 1.6 |
setDir | public void setDir(File directory)(Code) | | The directory to run the patch command in, defaults to the
project's base directory.
Parameters: directory - the directory to run the patch command in since: Ant 1.5 |
setIgnorewhitespace | public void setIgnorewhitespace(boolean ignore)(Code) | | flag to ignore whitespace differences; default=false
Parameters: ignore - if true ignore whitespace differences |
setOriginalfile | public void setOriginalfile(File file)(Code) | | The file to patch; optional if it can be inferred from
the diff file
Parameters: file - the file to patch |
setPatchfile | public void setPatchfile(File file)(Code) | | The file containing the diff output; required.
Parameters: file - the file containing the diff output |
setQuiet | public void setQuiet(boolean q)(Code) | | Work silently unless an error occurs; optional, default=false
Parameters: q - if true suppress set the -s option on the patch command |
setReverse | public void setReverse(boolean r)(Code) | | Assume patch was created with old and new files swapped; optional,
default=false
Parameters: r - if true set the -R option on the patch command |
setStrip | public void setStrip(int num) throws BuildException(Code) | | Strip the smallest prefix containing num leading slashes
from filenames.
patch's -p option.
Parameters: num - number of lines to strip exception: BuildException - if num is < 0, or other errors |
|
|