phing-util
[ class tree: phing-util ] [ index: phing-util ] [ all elements ]

Class: FileUtils

Source Location: /util/FileUtils.php

Class Overview


File utility class.


Author(s):

Version:

  • $Revision: 526 $

Methods



Class Details

[line 38]
File utility class.

  • handles os independent stuff etc
  • mapper stuff
  • filter stuff




Tags:

version:  $Revision: 526 $


[ Top ]


Class Methods


static method getChainedReader [line 49]

static Reader getChainedReader( $in, array &$filterChains, $project)

Returns a new Reader with filterchains applied. If filterchains are empty, simply returns passed reader.



Tags:

return:  Assembled Reader (w/ filter chains).
access:  public


Parameters:

Reader   $in   Reader to modify (if appropriate).
array   &$filterChains   filter chains to apply.
Project   $project  

[ Top ]

method contentEquals [line 278]

boolean contentEquals( $file1, $file2)



Tags:

return:  Whether contents of two files is the same.
access:  public


Parameters:

PhingFile   $file1  
PhingFile   $file2  

[ Top ]

method copyFile [line 75]

void copyFile( $sourceFile, $destFile, [boolean $overwrite = false], [boolean $preserveLastModified = true], [ &$filterChains = null], $project, [integer $mode = 0755], array $filterChains)

Copies a file using filter chains.



Parameters:

PhingFile   $sourceFile  
PhingFile   $destFile  
boolean   $overwrite  
boolean   $preserveLastModified  
array   $filterChains  
Project   $project  
integer   $mode  
   &$filterChains  

[ Top ]

method normalize [line 177]

string normalize( string $path)

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:

string   $path   Path to normalize.

[ Top ]

method resolveFile [line 126]

PhingFile resolveFile( $file $file, $filename $filename)

Interpret the filename as a file relative to the given file - unless the filename already represents an absolute filename.



Tags:

return:  A PhingFile object pointing to an absolute file that doesn't contain ./ or ../ sequences and uses the correct separator for the current platform.


Parameters:

$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

[ Top ]


Documentation generated on Mon, 19 Oct 2009 10:50:59 +0200 by phpDocumentor 1.4.3