Class rex_dir
Class for handling directories.
Methods summary
public static
boolean
|
#
create( string $dir, boolean $recursive = true )
Creates a directory.
Parameters
- $dir
- Path of the new directory
- $recursive
- When FALSE, nested directories won't be created
Returns
boolean TRUE on success, FALSE on failure
|
|
public static
boolean
|
#
isWritable( string $dir )
Returns wether the directory is writable.
Returns wether the directory is writable.
Parameters
- $dir
- Path of the directory
Returns
boolean bool
|
|
public static
boolean
|
#
copy( string $srcdir, string $dstdir )
Copies a directory.
Parameters
- $srcdir
- Path of the source directory
- $dstdir
- Path of the destination directory
Returns
boolean TRUE on success, FALSE on failure
|
|
public static
boolean
|
#
delete( string $dir, boolean $deleteSelf = true )
Deletes a directory.
Parameters
- $dir
- Path of the directory
- $deleteSelf
- When FALSE, only subdirectories and files will be deleted
Returns
boolean TRUE on success, FALSE on failure
|
|
public static
boolean
|
#
deleteFiles( string $dir, boolean $recursive = true )
Deletes the files in a directory.
Deletes the files in a directory.
Parameters
- $dir
- Path of the directory
- $recursive
- When FALSE, files in subdirectories won't be deleted
Returns
boolean TRUE on success, FALSE on failure
|
|
public static
boolean
|
#
deleteIterator( Traversable $iterator )
Deletes files and directories by a rex_dir_iterator.
Deletes files and directories by a rex_dir_iterator.
Parameters
- $iterator
- Iterator, $iterator->current() must return a SplFileInfo-Object
Returns
boolean TRUE on success, FALSE on failure
|
|