class File (View source)

Methods

static 
strictMode(bool $enable)

Enable or disable strict mode for check if file exists with case-sensitive (available only in development mode)

static bool
exists(string $path)

Check if file exists using case-sensitive, For help developers who using Windows OS and using unix-like for production

static string|false
permissions(string $path, bool $symbolic = false)

Get file/folder permissions in a format more readable.

static bool
output(string $path, int $length = 0, int $delay = 0)

Show file in output, if use ob_start is auto used ob_flush. You can set delay in microseconds for cycles

static string|false
portion(string $path, int $offset = 0, int $length = 1024)

Read excerpt from a file

static string|false
lines(string $path, int $offset = 0, int $max = 32)

Read lines from a file

static 
clearstat()

Clear state files and clear info files from Inphinit\File::permissions

Details

static strictMode(bool $enable)

Enable or disable strict mode for check if file exists with case-sensitive (available only in development mode)

Parameters

bool $enable

static bool exists(string $path)

Check if file exists using case-sensitive, For help developers who using Windows OS and using unix-like for production

Parameters

string $path

Return Value

bool

static string|false permissions(string $path, bool $symbolic = false)

Get file/folder permissions in a format more readable.

Return false if file is not found

Parameters

string $path
bool $symbolic

Return Value

string|false

Exceptions

Exception

static bool output(string $path, int $length = 0, int $delay = 0)

Show file in output, if use ob_start is auto used ob_flush. You can set delay in microseconds for cycles

Parameters

string $path
int $length
int $delay

Return Value

bool

Exceptions

Exception

static string|false portion(string $path, int $offset = 0, int $length = 1024)

Read excerpt from a file

Parameters

string $path
int $offset
int $length

Return Value

string|false

Exceptions

Exception

static string|false lines(string $path, int $offset = 0, int $max = 32)

Read lines from a file

Parameters

string $path
int $offset
int $max

Return Value

string|false

Exceptions

Exception

static clearstat()

Clear state files and clear info files from Inphinit\File::permissions