class FileSystem

File system tool.

Methods

static void
createDir($dir, $mode = 0777)

Creates a directory.

static void
copy($source, $dest, $overwrite = TRUE)

Copies a file or directory.

static void
delete($path)

Deletes a file or directory.

static void
rename($name, $newName, $overwrite = TRUE)

Renames a file or directory.

static void
write($file, $content, $mode = 0666)

Writes a string to a file.

static bool
isAbsolute($path)

Is path absolute?

Details

at line 26
static void createDir($dir, $mode = 0777)

Creates a directory.

Parameters

$dir
$mode

Return Value

void

Exceptions

IOException

at line 39
static void copy($source, $dest, $overwrite = TRUE)

Copies a file or directory.

Parameters

$source
$dest
$overwrite

Return Value

void

Exceptions

IOException

at line 74
static void delete($path)

Deletes a file or directory.

Parameters

$path

Return Value

void

Exceptions

IOException

at line 99
static void rename($name, $newName, $overwrite = TRUE)

Renames a file or directory.

Parameters

$name
$newName
$overwrite

Return Value

void

Exceptions

IOException
InvalidStateException

at line 122
static void write($file, $content, $mode = 0666)

Writes a string to a file.

Parameters

$file
$content
$mode

Return Value

void

Exceptions

IOException

at line 138
static bool isAbsolute($path)

Is path absolute?

Parameters

$path

Return Value

bool