LimeSurvey API - Master branch

dir

Table of Contents

Methods

content()  : mixed
Get the content of the given directory. Returns an array with filenames or FALSE on failure
fileSort()  : mixed
isWritable()  : bool
Checks if the given directory is really writable. The standard PHP function is_writable() does not work properly on Windows servers
prune()  : mixed
Recursively delete the given directory. Returns TRUE on success.

Methods

content()

Get the content of the given directory. Returns an array with filenames or FALSE on failure

public static content(string $dir[, array<string|int, mixed> $options = null ]) : mixed
Parameters
$dir : string
$options : array<string|int, mixed> = null

fileSort()

public static fileSort(mixed $a, mixed $b) : mixed
Parameters
$a : mixed
$b : mixed

isWritable()

Checks if the given directory is really writable. The standard PHP function is_writable() does not work properly on Windows servers

public static isWritable(string $dir) : bool
Parameters
$dir : string
Return values
bool

prune()

Recursively delete the given directory. Returns TRUE on success.

public static prune(string $dir[, bool $firstFailExit = true ][, array<string|int, mixed> $failed = null ]) : mixed

If $firstFailExit parameter is true (default), the method returns the path to the first failed file or directory which cannot be deleted. If $firstFailExit is false, the method returns an array with failed files and directories which cannot be deleted. The third parameter $failed is used for internal use only.

Parameters
$dir : string
$firstFailExit : bool = true
$failed : array<string|int, mixed> = null

        
On this page

Search results