This is an abstract class for platform specific filesystem implementations you have to implement each method in the platform specific filesystem implementation classes Your local filesytem implementation must extend this class.
You should also use this class as a template to write your local implementation Some native PHP filesystem specific methods are abstracted here as well. Anyway you must always use this methods via a PhingFile object (that by nature uses the *FileSystem drivers to access the real filesystem via this class using natives.
FIXME:
package |
phing.system.io |
---|
__construct()
_access( $path) : boolean
throws |
---|
boolean
_driveIndex( $d) : integer
integer
_getDrive( $path) : null|string
null|string
_getDriveDirectory( $drive) : null
null
_getUserPath() : string
string
_isPharArchive( $strPath) : boolean
boolean
_nativeListRoots()
canDelete(\PhingFile $f) : boolean
canonicalize(string $strPath) : mixed
string
mixed
Canonical path or false if the file doesn't exist.
checkAccess(\PhingFile $f, boolean $write = false) : boolean
chgrp(string $pathname, string $group) : void
throws |
if operation failed. |
---|
string
Path and name of file or directory.
chmod(string $pathname, integer $mode) : void
throws |
if operation failed. |
---|
string
Path and name of file or directory.
integer
The mode (permissions) of the file or directory. If using octal add leading 0. eg. 0777. Mode is affected by the umask system setting.
chown(string $pathname, string $user) : void
throws |
if operation failed. |
---|
string
Path and name of file or directory.
compare(\PhingFile $f1, \PhingFile $f2)
compareMTimes(string $file1, string $file2) : integer
throws |
|
---|
string
Path and name of file1.
string
Path and name of file2.
integer
1 if file1 is newer. -1 if file2 is newer. 0 if files have the same time. Err object on failure.
copy(\PhingFile $src, \PhingFile $dest) : void
throws |
if file cannot be copied. |
---|
copyr(string $source, string $dest) : boolean
author |
Aidan Lister aidan@php.net |
---|---|
version | 1.0.1 |
link |
string
Source path
string
Destination path
boolean
Returns TRUE on success, FALSE on failure
createDirectory(\PhingFile &$f, integer $mode = 493) : boolean
NOTE: umask() is reset to 0 while executing mkdir(), and restored afterwards
\PhingFile
integer
boolean
createNewFile(string $strPathname) : boolean
throws |
---|
string
Path of the file to be created.
boolean
delete(\PhingFile $f, boolean $recursive = false) : void
deleteOnExit(\PhingFile $f)
fromURIPath(string $path)
string
getBooleanAttributes(\PhingFile $f)
getDefaultParent()
getFileSystem() : \FileSystem
getLastModifiedTime(\PhingFile $f) : integer
getLength(\PhingFile $f) : integer
getPathSeparator()
getSeparator()
isAbsolute(\PhingFile $f)
isLetter( $c) : boolean
boolean
isSlash( $c) : boolean
boolean
listDir(\PhingFile $f) : array
lister( $f) : array
throws |
---|
array
listRoots()
throws | |
---|---|
lock(\PhingFile $f) : void
normalize(string $strPath)
string
normalizePrefix( $strPath, $len, &$sb) : integer
0 relative to both drive and directory 1 drive-relative (begins with '\') 2 absolute UNC (if first char is '\'), else directory-relative (has form "z:foo") 3 absolute local pathname (begins with "z:\")
integer
normalizer( $strPath, $len, $offset) : string
string
prefixLength(string $pathname)
string
rename(\PhingFile $f1, \PhingFile $f2) : void
throws |
if rename cannot be performed |
---|
resolve(string $parent, string $child)
Both strings must be in normal form, and the result will be a string in normal form.
string
string
resolveFile(\PhingFile $f)
rmdir(string $dir, boolean $children = false) : void
throws |
---|
string
Path and/or name of directory to delete.
boolean
False: don't delete directory contents. True: delete directory contents.
setLastModifiedTime(\PhingFile $f, integer $time) : void
setReadOnly(\PhingFile $f)
slashify( $p) : string
string
symlink(string $target, string $link) : void
Currently symlink is not implemented on Windows. Don't use if the application is to be portable.
throws |
---|
string
Path and/or name of file to link.
string
Path and/or name of link to be created.
touch(string $file, integer $time = null) : void
throws |
---|
string
Path and/or name of file to touch.
integer
unlink(string $file) : void
throws |
|
---|
string
Path and/or name of file to delete.
unlock(\PhingFile $f) : void
BA_EXISTS
var |
---|
BA_REGULAR
var |
---|
BA_DIRECTORY
var |
---|
BA_HIDDEN
var |
---|
slash :
altSlash :
semicolon :
driveDirCache :