org.apache.tools.ant.taskdefs
Class Patch
Patches a file by applying a 'diff' file to it; requires "patch" to be
on the execution path.
void | execute()- execute patch
|
void | setBackups(boolean backups)- flag to create backups; optional, default=false
|
void | setDestfile(File file)- The name of a file to send the output to, instead of patching
the file(s) in place; optional.
|
void | setDir(File directory)- The directory to run the patch command in, defaults to the
project's base directory.
|
void | setIgnorewhitespace(boolean ignore)- flag to ignore whitespace differences; default=false
|
void | setOriginalfile(File file)- The file to patch; optional if it can be inferred from
the diff file
|
void | setPatchfile(File file)- The file containing the diff output; required.
|
void | setQuiet(boolean q)- Work silently unless an error occurs; optional, default=false
|
void | setReverse(boolean r)- Assume patch was created with old and new files swapped; optional,
default=false
|
void | setStrip(int num)- Strip the smallest prefix containing num leading slashes
from filenames.
|
execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
setBackups
public void setBackups(boolean backups)
flag to create backups; optional, default=false
backups - if true create backups
setDestfile
public void setDestfile(File file)
The name of a file to send the output to, instead of patching
the file(s) in place; optional.
file - the file to send the output to
setDir
public void setDir(File directory)
The directory to run the patch command in, defaults to the
project's base directory.
directory - the directory to run the patch command in
setIgnorewhitespace
public void setIgnorewhitespace(boolean ignore)
flag to ignore whitespace differences; default=false
ignore - if true ignore whitespace differences
setOriginalfile
public void setOriginalfile(File file)
The file to patch; optional if it can be inferred from
the diff file
setPatchfile
public void setPatchfile(File file)
The file containing the diff output; required.
file - the file containing the diff output
setQuiet
public void setQuiet(boolean q)
Work silently unless an error occurs; optional, default=false
q - if true suppress set the -s option on the patch command
setReverse
public void setReverse(boolean r)
Assume patch was created with old and new files swapped; optional,
default=false
r - if true set the -R option on the patch command
setStrip
public void setStrip(int num)
throws BuildException Strip the smallest prefix containing
num leading slashes
from filenames.
patch's
-p option.
num - number of lines to strip
Copyright B) 2000-2006 Apache Software Foundation. All Rights Reserved.