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 |
|---|
stringFile containing the diff output
setOriginalFile(string $file) : void
Optional if it can be inferred from the diff file.
stringFile to patch
setDestFile(string $file) : void
Optional.
stringFile to send the output to
setBackups(bool $backups) : void
Optional, default - false
boolIf true create backups
setIgnoreWhiteSpace(bool $ignore) : void
Default - false
boolIf true ignore whitespace differences
setStrip(int $num) : void
patch's --strip option.
| throws |
if num is < 0, or other errors |
|---|
intnumber of lines to strip
setQuiet(bool $flag) : void
Optional, default - false
boolIf true suppress set the -s option on the patch command
setReverse(bool $flag) : void
Optional, default - false
boolIf true set the -R option on the patch command
setDir(string $directory) : void
Defaults to the project's base directory.
stringDirectory to run the patch command in
setForward(bool $flag) : void
boolIf true set the -N (--forward) option
setFuzz(string $value) : void
Defaults to 0
stringValue 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
stringName of this task
setTaskName(string $name) : string
string
stringA string representing the name of this task for log
getTaskType() : string
stringThe type of this task (XML Tag)
setTaskType($name)
getRegisterSlot(string $slotName)
string
log(string $msg, integer $level = \Project::MSG_INFO)
stringThe message to be logged.
integerThe message's priority at this message should have
setDescription(string $desc)
stringThe text describing the task
getDescription() : string
stringThe 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