\jb\commonFilesystem

Class Filesystem

Summary

Methods
Properties
Constants
__construct()
init_paths()
clear_temp_dir()
get_upload_dir()
get_upload_url()
format_bytes()
$upload_dir
$upload_url
$temp_upload_dir
$temp_upload_url
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$upload_dir

$upload_dir : array

Type

normal

$upload_url

$upload_url : array

Type

normal

$temp_upload_dir

$temp_upload_dir : string

Type

normal

$temp_upload_url

$temp_upload_url : string

Type

normal

Methods

__construct()

__construct() : mixed

Filesystem constructor.

Returns

mixed

init_paths()

init_paths() : mixed

Init uploading URL and directory

Returns

mixed

clear_temp_dir()

clear_temp_dir() : mixed

Remove all files, which are older than 24 hours

Returns

mixed

get_upload_dir()

get_upload_dir(string  $dir = '', int|null  $blog_id = null) : string

Get upload dir of plugin

Parameters

string $dir
int|null $blog_id

Returns

string

get_upload_url()

get_upload_url(string  $url = '', int|null  $blog_id = null) : string

Get upload url of plugin

Parameters

string $url
int|null $blog_id

Returns

string

format_bytes()

format_bytes(int  $size, int  $precision = 1) : string

Format Bytes

Parameters

int $size
int $precision

Returns

string