# classes/phing/util/FileUtils.php

## \FileUtils
jump to top

File utility class.

- handles os independent stuff etc
- mapper stuff
- filter stuff

package
  phing.util
version
  $Revision: 781 $

### Methods

`contentEquals( $file1, $file2 ) : boolean`
Parameters

Name | Type | Description
--- | --- | ---
$file1 |  |
$file2 |  |

Returns

Type | Description
--- | ---
boolean |

`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`
staticReturns a new Reader with filterchains applied. If filterchains are empty, simply returns passed reader.
Parameters

Name | Type | Description
--- | --- | ---
$in | \Reader | Reader to modify (if appropriate).
$filterChains | array | &$filterChains filter chains to apply.
$project | \Project |

Returns

Type | Description
--- | ---
\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.

Parameters

Name | Type | Description
--- | --- | ---
$path | string | Path to normalize.

Returns

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

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

Returns

Type | Description
--- | ---
\PhingFile |

Documentation was generated by DocBlox 0.13.1.