File utility class.
package |
phing.util |
---|
contentEquals(\PhingFile $file1, \PhingFile $file2) : boolean
\PhingFile
\PhingFile
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 = 493, boolean $preservePermissions = true) : void
throws |
---|
\PhingFile
\PhingFile
boolean
boolean
array
\Project
integer
boolean
createTempFile(string $prefix, string $suffix, \PhingFile $parentDir, boolean $deleteOnExit = false, boolean $createFile = false) : \PhingFile
The file denoted by the returned abstract pathname did not exist before this method was invoked, any subsequent invocation of this method will yield a different file name.
throws |
---|
string
prefix before the random number.
string
file extension; include the '.'.
\PhingFile
Directory to create the temporary file in; sys_get_temp_dir() used if not specified.
boolean
whether to set the tempfile for deletion on normal exit.
boolean
true if the file must actually be created. If false chances exist that a file with the same name is created in the time between invoking this method and the moment the file is actually created. If possible set to true.
\PhingFile
a File reference to the new temporary file.
getChainedReader(\Reader $in, &$filterChains, \Project $project) : \Reader
getDefaultFileCreationMask(boolean $dirmode = false, boolean $returnoctal = false) : string
boolean
Directory creation mask to select
boolean
Whether the return value is in octal representation
string
Creation Mask
normalize(string $path) : string
This includes:
throws |
---|
string
Path to normalize.
string
resolveFile(\PhingFile $file, string $filename) : \PhingFile
throws |
---|
\PhingFile
the "reference" file for relative paths. This instance must be an absolute file and must not contain ./ or ../ sequences (same for \ instead of /).
string
a file name
\PhingFile
A PhingFile object pointing to an absolute file that doesn't contain ./ or ../ sequences and uses the correct separator for the current platform.