Class: CodeGen_Tools_FileReplacer
Source Location: /CodeGen-1.0.3/CodeGen/Tools/FileReplacer.php
A file output class that only overwrites files on content changes
Author(s):
Version:
- Release: @package_version@
Copyright:
Inherited Variables
Inherited Methods
Class Details
[line 41]
A file output class that only overwrites files on content changes
File output is first collected in a temporary file, after the output is finished the temporary file is compared to the previous file (by size and md5 checksum), only when changes are detected the file is replaced, else the old version is kept and the temporary file removed. This way unchanged files keep their old modification date which improves "make" build times
Class Variables
$fileName =
[line 48]
output filename
$fp =
[line 62]
temporary file handle
$tempName =
[line 55]
temporary filename
Method Detail
__construct (Constructor) [line 69]
CodeGen_Tools_FileReplacer __construct(
string
$fileName)
Constructor
Parameters:
string
$fileName
—
target filename
close [line 94]
Do final output, replace original file on changes
puts [line 84]
int puts(
string
$string)
Write text to file
- Return: number of characters written
Parameters:
string
$string
—
output text
Documentation generated on 2019年3月11日 15:00:14 -0400 by
phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.