|
|
|
File: c:/www/apache/doc2//filehandler/PhpdocFileHandler.php
PHPDOC 2000/12/03 - PHPDoc
PhpdocFileHandler
PhpdocObject | +-- PhpdocFileHandler
File handling functions in phpdoc.
|
private class PhpdocFileHandler extends PhpdocObject
File handling functions in phpdoc.
|
| |
|
|
|
|
|
|
|
|
|
Private Field Summary |
| string |
$pathFilepath. The path is automatically added in front of all filenames |
|
Public Method Details |
get |
|
public void get( mixed $files )
|
| |
Reads a list of files or one file.
|
| Parameter |
|
| mixed |
$files |
|
|
or an array filenames, $k => $filename |
|
| Returns |
void |
| Throws |
PhpdocError |
|
setFilePath |
|
public bool setFilePath( string $path )
|
| |
Sets the filepath. The path is automatically added in front of all filenames
|
| Parameter |
|
|
| Returns |
bool $ok |
|
|
Private Method Details |
getFile |
|
private string getFile( string $filename )
|
| |
Reads a file.
|
| Parameter |
|
|
| Returns |
string $content |
| Throws |
PhpdocError |
|
appendToFile |
|
private boolean appendToFile( string $filename, string $content, [ string $directory ] )
|
| |
Appends a string to a file.
|
| Parameter |
|
|
|
| string |
$content |
|
|
to append |
|
|
| string |
$directory |
= >>""<< |
|
prefix
@throw PHPDocError |
|
| Returns |
boolean |
|
createFile |
|
private boolean createFile( string $filename, string $content, [ string $directory ] )
|
| |
Creates a new file.
Create or overrides a file in a specified directory. If thedirectory does not exists, it attempts to create it.
|
| Parameter |
|
|
|
|
|
| string |
$directory |
= >>""<< |
|
|
|
| Returns |
boolean |
| Throws |
PHPDocError |
|
getFilesInDirectory |
|
private array getFilesInDirectory( string $directory, [ mixed $suffix, boolean $flag_subdir, string $files ] )
|
| |
Returns a list of files in a specified directory
|
| Parameter |
|
|
|
| mixed |
$suffix |
= >>""<< |
|
Suffix of the files returned |
|
|
| boolean |
$flag_subdir |
= >>true<< |
|
include subdirectories? |
|
|
| string |
$files |
= >>""<< |
|
New entries are added to this variable if provided.
Used only for the subdir feature. |
|
| Returns |
array $files |
| Throws |
PhpdocError |
|
|
Private Field Details |
$path |
|
private string $path
>>""<<
Filepath. The path is automatically added in front of all filenames
|
| See Also |
setFilePath() |
|
|
|
|
|
| PHPDoc 1.0beta |