# FileUtils Class Reference
[Various accompanying utilities]

Utilities for file handling. More...

Inheritance diagram for FileUtils:
[legend]

List of all members.

## Static Public Member Functions

static | convertLineEndings ($dir, $ignore, $from="\r\n", $to="\n")
| Recursively walks through $dir and converts line endings of all but listed in $ignore files.
static | makeTempFile ($where= 'file-utils/', $prefix= '', $mkdirMode=0700)
static | makeTempDirectory ($where= 'file-utils/', $prefix= '', $mode=0700)
static | makeUniqueName ($fileName)
static | removeDirectory ($directory, $recursive=false)
static | upload ($source, $target)
static | move ($source, $target)
static | unlink ($filePath)

## Detailed Description

Utilities for file handling.

Definition at line 17 of file FileUtils.class.php.

## Member Function Documentation

static FileUtils::convertLineEndings | ( | $ | dir,
|  | $ | ignore,
|  | $ | from = `"\r\n"`,
|  | $ | to = `"\n"` |
| ) |  |  | `[static]`

Recursively walks through $dir and converts line endings of all but listed in $ignore files.

Definition at line 23 of file FileUtils.class.php.

static FileUtils::makeTempDirectory | ( | $ | where = `'file-utils/'`,
|  | $ | prefix = `''`,
|  | $ | mode = `0700` |
| ) |  |  | `[static]`

Definition at line 88 of file FileUtils.class.php.

Referenced by TempDirectory::__construct().

static FileUtils::makeTempFile | ( | $ | where = `'file-utils/'`,
|  | $ | prefix = `''`,
|  | $ | mkdirMode = `0700` |
| ) |  |  | `[static]`

Definition at line 66 of file FileUtils.class.php.

Referenced by TempFile::__construct().

static FileUtils::makeUniqueName | ( | $ | fileName | ) | `[static]`

Definition at line 117 of file FileUtils.class.php.

static FileUtils::move | ( | $ | source,
|  | $ | target |
| ) |  |  | `[static]`

Definition at line 173 of file FileUtils.class.php.

static FileUtils::removeDirectory | ( | $ | directory,
|  | $ | recursive = `false` |
| ) |  |  | `[static]`

Definition at line 127 of file FileUtils.class.php.

References unlink().

Referenced by TempDirectory::__destruct(), RubberFileSystem::clean(), and FileSystemSegmentHandler::drop().

Here is the call graph for this function:

static FileUtils::unlink | ( | $ | filePath | ) | `[static]`

Definition at line 186 of file FileUtils.class.php.

Referenced by removeDirectory().

static FileUtils::upload | ( | $ | source,
|  | $ | target |
| ) |  |  | `[static]`

Definition at line 160 of file FileUtils.class.php.

The documentation for this class was generated from the following file:

- main/Utils/FileUtils.class.php