Dir Dir(
[String
$dir = '']
)
|
|
Constructor
Parameters:
|
String |
$dir: |
A valid directory to open for read or write |
String cd(
[String
$dir = '']
)
|
|
Change to the specified directory
Parameters:
|
String |
$dir: |
Change to the specified directory |
API Tags:
| Return: | Returns true on success |
Get the current working directory
Get the CWD (Current Working Directory)
API Tags:
| Return: | The name of the Current Working Directory |
Return the last error message
API Tags:
String getUrl(
[String
$path = '']
)
|
|
Get the URL extracted from the current working directory
- Usage:
- $theDir = new Dir();
- $href = $theDir->getUrl();
Get the url from the Current Working Directory
Parameters:
|
String |
$path: |
The path to use for the url calculation |
API Tags:
| Return: | The url extracted from the Current Working Directory |
List the directory
API Tags:
| Return: | The list of the dir |
boolean, mkdir(
String
$dir, [String
$mode = '']
)
|
|
Create a new directory
Parameters:
|
String |
$dir: |
A valid directory to open for read or write |
|
String |
$mode: |
Access permissions, i.e. 0700 |
API Tags:
| Return: | Returns true on success |
Open the directory
API Tags:
| Return: | Returns true on success |
Read from the directory
API Tags:
| Return: | Returns the name of next entry in the directory Returns false, if no more entries |
boolean rmdir(
String
$dir
)
|
|
Deletes a directory.
Note: The command will fail, if the directory is non-empty
Parameters:
|
String |
$dir: |
A valid directory to open for read or write |
API Tags:
| Return: | Returns true on success |