ConfigParser/File.php
- author
- Vítor Brandão <noisebleed@noiselabs.org>
- category
- NoiseLabs
- copyright
- (C) 2011 Vítor Brandão <noisebleed@noiselabs.org>
- package
- ConfigParser
- version
- 0.1.1
- Classes
- File
Description
This file is part of NoiseLabs-PHP-ToolKit
NoiseLabs-PHP-ToolKit is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
NoiseLabs-PHP-ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with NoiseLabs-PHP-ToolKit; if not, see http://www.gnu.org/licenses/.
Copyright (C) 2011 Vítor Brandão noisebleed@noiselabs.org
NoiseLabs\ToolKit\ConfigParser\File
- Properties
- $_path
- $_handle
- $_mode
- Methods
- __construct
- getPathname
- open
- write
- close
- isReadable
- isWritable
- remove
Properties
$_handle
$_handle = ''
File pointer to the given filename.
Details
- visibility
- protected
- default
- final
- false
- static
- false
$_mode
$_mode = ''
A list of possible modes for fopen():
'r': Open for reading only; place the file pointer at the beginning of the file.
'r+': Open for reading and writing; place the file pointer at the beginning of the file.
'w': Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it.
'w+': Open for reading and writing; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it.
'a': Open for writing only; place the file pointer at the end of the file. If the file does not exist, attempt to create it.
'a+': Open for reading and writing; place the file pointer at the end of the file. If the file does not exist, attempt to create it.
'x': Create and open for writing only; place the file pointer at the beginning of the file. If the file already exists, the fopen() call will fail by returning FALSE and generating an error of level E_WARNING. If the file does not exist, attempt to create it. This is equivalent to specifying O_EXCL|O_CREAT flags for the underlying open(2) system call.
'x+': Create and open for reading and writing; otherwise it has the same behavior as 'x'.
'c': Open the file for writing only. If the file does not exist, it is created. If it exists, it is neither truncated (as opposed to 'w'), nor the call to this function fails (as is the case with 'x'). The file pointer is positioned on the beginning of the file. This may be useful if it's desired to get an advisory lock (see flock()) before attempting to modify the file, as using 'w' could truncate the file before the lock was obtained (if truncation is desired, ftruncate() can be used after the lock is requested).
'c+': Open the file for reading and writing; otherwise it has the same behavior as 'c'.
Details
- visibility
- protected
- default
- final
- false
- static
- false
$_path
$_path = ''
Pathname
Details
- visibility
- protected
- default
- final
- false
- static
- false
Methods
__construct
__construct(
$filename, $mode
=
rb
)
:
Arguments
- $filename
- $mode
Details
- visibility
- public
- final
- false
- static
- false
close
close(
)
:
Details
- visibility
- public
- final
- false
- static
- false
getPathname
getPathname(
)
:
Details
- visibility
- public
- final
- false
- static
- false
isReadable
isReadable(
)
:
Details
- visibility
- public
- final
- false
- static
- false
isWritable
isWritable(
)
:
Details
- visibility
- public
- final
- false
- static
- false
open
open(
$mode
=
null
)
:
Arguments
- $mode
Details
- visibility
- public
- final
- false
- static
- false
remove
remove(
)
:
Details
- visibility
- public
- final
- false
- static
- false
write
write(
$content
)
:
Arguments
- $content
Details
- visibility
- public
- final
- false
- static
- false