FileAccess Orion

File
in package

Implement file object

This is a file or folder object loaded from a storage folder

Tags
category

Helper

author

Tobias Teichner webmaster@teichner.biz

since

File available since v4.18.0

Table of Contents

$change_date  : string|null
The last changed time of this file
$content  : array<string|int, mixed>|null
$create_date  : string|null
The creation time of this file
$extension  : bool|string
The file extension
$has_manifest  : bool|null
$id  : string
Folder id, the name
$is_dir  : bool
Is this a directory or a file
$manifest  : bool|null
Is a manifest base file
$name  : string|null
Storage for file or folder name
$path  : string|null
Absolute path to this file
$readable_size  : string
The human-readable size in mb
$size  : int
The file size, null for folders
__construct()  : mixed
File constructor.
Contents()  : string|null
Get/Set the file raw contents

Properties

$change_date

The last changed time of this file

public string|null $change_date = null

The formatted date

$content

public array<string|int, mixed>|null $content = null

$create_date

The creation time of this file

public string|null $create_date = null

The formatted date

$extension

The file extension

public bool|string $extension = ''

The extension

$has_manifest

public bool|null $has_manifest = null

$id

Folder id, the name

public string $id = ''

$is_dir

Is this a directory or a file

public bool $is_dir = false

Is a directory

$manifest

Is a manifest base file

public bool|null $manifest = null

$name

Storage for file or folder name

public string|null $name = ''

The file name

$path

Absolute path to this file

public string|null $path = null

The path

$readable_size

The human-readable size in mb

public string $readable_size = '0Mb'

$size

The file size, null for folders

public int $size = 0

The file size in byte

Methods

__construct()

File constructor.

public __construct(string $path) : mixed
Parameters
$path : string

The absolute path

Return values
mixed

Contents()

Get/Set the file raw contents

public Contents([string|null $new_value = null ]) : string|null
Parameters
$new_value : string|null = null
Return values
string|null

Search results