classes/phing/util/FileUtils.php
\FileUtils
File utility class.
- handles os independent stuff etc
- mapper stuff
- filter stuff
- package
- phing.util
- version
- $Revision: 781 $
Methods

contentEquals(
$file1, $file2
)
:
boolean
| Name | Type | Description |
|---|---|---|
| $file1 | ||
| $file2 |
| Type | Description |
|---|---|
| boolean |

copyFile(
\PhingFile $sourceFile, \PhingFile $destFile, boolean $overwrite
=
false, boolean $preserveLastModified
=
true, array $filterChains
=
null, \Project $project, integer $mode
=
0755
)
:
voidCopies a file using filter chains.
| Name | Type | Description |
|---|---|---|
| $sourceFile | \PhingFile | |
| $destFile | \PhingFile | |
| $overwrite | boolean | |
| $preserveLastModified | boolean | |
| $filterChains | array | |
| $project | \Project | |
| $mode | integer |

getChainedReader(
\Reader $in, array $filterChains, \Project $project
)
:
\Reader
staticReturns a new Reader with filterchains applied. If filterchains are empty,
simply returns passed reader.
| Name | Type | Description |
|---|---|---|
| $in | \Reader | Reader to modify (if appropriate). |
| $filterChains | array | &$filterChains filter chains to apply. |
| $project | \Project |
| Type | Description |
|---|---|
| \Reader |

normalize(
string $path
)
:
stringNormalize the given absolute path.
This includes: - Uppercase the drive letter if there is one. - Remove redundant slashes after the drive spec. - resolve all ./, .\, ../ and ..\ sequences. - DOS style paths that start with a drive letter will have \ as the separator.
| Name | Type | Description |
|---|---|---|
| $path | string | Path to normalize. |
| Type | Description |
|---|---|
| string |

resolveFile(
\$file $file, \$filename $filename
)
:
\PhingFileInterpret the filename as a file relative to the given file -
unless the filename already represents an absolute filename.
| Name | Type | Description |
|---|---|---|
| $file | \$file | the "reference" file for relative paths. This instance must be an absolute file and must not contain ./ or ../ sequences (same for \ instead of /). |
| $filename | \$filename | a file name |
| Type | Description |
|---|---|
| \PhingFile |