Patches a file by applying a 'diff' file to it
Requires "patch" to be on the execution path.
package |
phing.tasks.ext |
---|
setPatchFile(string $file) : void
Required.
throws |
if $file not exists |
---|
string
File containing the diff output
setOriginalFile(string $file) : void
Optional if it can be inferred from the diff file.
string
File to patch
setDestFile(string $file) : void
Optional.
string
File to send the output to
setBackups(bool $backups) : void
Optional, default - false
bool
If true create backups
setIgnoreWhiteSpace(bool $ignore) : void
Default - false
bool
If true ignore whitespace differences
setStrip(int $num) : void
patch's --strip option.
throws |
if num is < 0, or other errors |
---|
int
number of lines to strip
setQuiet(bool $flag) : void
Optional, default - false
bool
If true suppress set the -s option on the patch command
setReverse(bool $flag) : void
Optional, default - false
bool
If true set the -R option on the patch command
setDir(string $directory) : void
Defaults to the project's base directory.
string
Directory to run the patch command in
setForward(bool $flag) : void
bool
If true set the -N (--forward) option
setFuzz(string $value) : void
Defaults to 0
string
Value of a fuzz factor
setHaltOnFailure(bool $value) : void
The default is "false"
bool
"true" if it should halt, otherwise "false"
main()
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.
setOwningTarget(\Target $target)
getOwningTarget() : \Target
getTaskName() : string
string
Name of this task
setTaskName(string $name) : string
string
string
A string representing the name of this task for log
getTaskType() : string
string
The type of this task (XML Tag)
setTaskType($name)
getRegisterSlot(string $slotName)
string
log(string $msg, integer $level = \Project::MSG_INFO)
string
The message to be logged.
integer
The message's priority at this message should have
setDescription(string $desc)
string
The text describing the task
getDescription() : string
string
The text description of the task
init()
Should throw a BuildException if something goes wrong with the build
This is abstract here, but may not be overloaded by subclasses.
throws |
---|
getLocation() : \Location
setLocation(\Location $location)
getRuntimeConfigurableWrapper() : \RuntimeConfigurable
setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper)
maybeConfigure()
perform()
setProject(\Project $project)
getProject() : \Project
CMD
var |
---|
originalFile : string
var |
---|
string
patchFile : string
var |
---|
string
strip : int
var |
---|
int
cmdArgs : array
var |
---|
array
haltOnFailure : bool
var |
---|
bool
description : string
var |
---|
string
taskType : string
var |
---|
string
taskName : string
var |
---|
string
project : \Project