util/FileUtils.php
\FileUtils
Package: phing\util
Parameters
Returns
File utility class.
- handles os independent stuff etc
- mapper stuff
- filter stuff
- Version
- $Id$
Methods


contentEquals(
$file1, $file2
)
:
boolean
Parameters
Returns
Name | Type | Description |
---|---|---|
$file1 | ||
$file2 |
Type | Description |
---|---|
boolean | Whether contents of two files is the same. |


copyFile(
\PhingFile $sourceFile, \PhingFile $destFile, boolean $overwrite
=
false, boolean $preserveLastModified
=
true, array $filterChains
=
null, \Project $project, integer $mode
=
0755
)
:
void
Copies a file using filter chains.
Parameters
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
static
Returns a new Reader with filterchains applied. If filterchains are empty, simply returns passed reader.


normalize(
string $path
)
:
string
Normalize 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
)
:
\PhingFile
Interpret the filename as a file relative to the given file - unless the filename already represents an absolute filename.
Parameters
Returns
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 | A PhingFile object pointing to an absolute file that doesn't contain ./ or ../ sequences and uses the correct separator for the current platform. |