class Local extends Contract

Traits

Properties

protected $adapter

Default propperty

from  Contract
protected $filesystem from  Contract
protected $diskName from  Contract
protected $path from  Contract
protected $error from  Contract

Methods

void
directories(string $directoryName = '/')

Retrieve all content of directory

from  Contract
void
makeDirectory(string $directoryName)

Make a directory

from  Contract
bool
isExists(string $path)

Check if file or directory exists or not

from  Contract
void
move(string $from, string $to)

Move file

from  Contract
void
copy(string $from, string $to)

Copy file

from  Contract
void
delete(string $inputPath)

Delete file

from  Contract
void
deleteDirectory(string $path)

Delete directory

from  Contract
void
put(string $path, mixed $content)

Create file

from  Contract
void
putStream(string $path, mixed $content)

Create stream file

from  Contract
void
read(string $path)

Read a file

from  Contract
void
readStream(string $path)

Read a file with stream

from  Contract
lastModified(string $path)

Get last modified

from  Contract
object
upload(string $fileToUpload, closure $validation)

Upload file process with stream

string
getProviderName()

Get class name

from  Contract
getFilesystem()

Get filesystem instance

from  Contract
getDiskName()

Get filesystem instance

from  Contract
void
getPath(string $additionalPath = '')

Get main path

from  Contract
void
getSize(string $path)

Get size of file

from  Contract
getError()

No description

from  Contract
bool
isMimeAllowed(array $allowedMime = [])

Check if mime is allowed or not

from  Guard
bool
isExtensionAllowed(array $allowedExtension = [])

Check if extension is allowed or not

from  Guard
bool
isLimitExceeded(int|string $maxSize)

File size limit check

from  Guard
bool
isValid()

get upload status

from  Guard
void
destroyIfFailed()

Destroy uploaded file if file have invalid condition

from  Guard
void
toByteSize(string $NumberLimit)

Convert from '2MByte' to '2000000Byte'

from  Utils
void
getExt(string $fileToUpload)

Get extension from path info

from  Utils
string
getUploadedFileName()

Get filename of uploaded file

from  Utils
bool
getUploadStatus()

Get uploaded status

from  Utils
void
cleanExifInfo()

Clean exif info modification from https://stackoverflow.com/a/38862429/13322576

from  Utils
void
streamFile(string $filePath, string $callback = '')

Open and stream a file

from  Stream
void
download(string $filePath)

Download somae file

from  Stream
__construct(string $root, string $diskName)

Define adapter and filesystem

object
as(string $newName)

Rename uploaded file with new name

Details

in Contract at line 34
void directories(string $directoryName = '/')

Retrieve all content of directory

Parameters

string $directoryName

Return Value

void

in Contract at line 45
void makeDirectory(string $directoryName)

Make a directory

Parameters

string $directoryName

Return Value

void

in Contract at line 56
bool isExists(string $path)

Check if file or directory exists or not

Parameters

string $path

Return Value

bool

in Contract at line 68
void move(string $from, string $to)

Move file

Parameters

string $from
string $to

Return Value

void

in Contract at line 80
void copy(string $from, string $to)

Copy file

Parameters

string $from
string $to

Return Value

void

in Contract at line 91
void delete(string $inputPath)

Delete file

Parameters

string $inputPath

Return Value

void

in Contract at line 102
void deleteDirectory(string $path)

Delete directory

Parameters

string $path

Return Value

void

in Contract at line 114
void put(string $path, mixed $content)

Create file

Parameters

string $path
mixed $content

Return Value

void

in Contract at line 126
void putStream(string $path, mixed $content)

Create stream file

Parameters

string $path
mixed $content

Return Value

void

in Contract at line 137
void read(string $path)

Read a file

Parameters

string $path

Return Value

void

in Contract at line 148
void readStream(string $path)

Read a file with stream

Parameters

string $path

Return Value

void

in Contract at line 156
lastModified(string $path)

Get last modified

Parameters

string $path

at line 48
object upload(string $fileToUpload, closure $validation)

Upload file process with stream

Parameters

string $fileToUpload
closure $validation

Return Value

object

in Contract at line 175
string getProviderName()

Get class name

Return Value

string

in Contract at line 184
getFilesystem()

Get filesystem instance

in Contract at line 192
getDiskName()

Get filesystem instance

in Contract at line 202
void getPath(string $additionalPath = '')

Get main path

Parameters

string $additionalPath

Return Value

void

in Contract at line 213
void getSize(string $path)

Get size of file

Parameters

string $path

Return Value

void

in Contract at line 219
getError()

No description

in Guard at line 23
bool isMimeAllowed(array $allowedMime = [])

Check if mime is allowed or not

Parameters

array $allowedMime

Return Value

bool

in Guard at line 41
bool isExtensionAllowed(array $allowedExtension = [])

Check if extension is allowed or not

Parameters

array $allowedExtension

Return Value

bool

in Guard at line 58
bool isLimitExceeded(int|string $maxSize)

File size limit check

Parameters

int|string $maxSize

Return Value

bool

in Guard at line 74
bool isValid()

get upload status

Return Value

bool

in Guard at line 85
void destroyIfFailed()

Destroy uploaded file if file have invalid condition

Return Value

void

in Utils at line 21
void toByteSize(string $NumberLimit)

Convert from '2MByte' to '2000000Byte'

Parameters

string $NumberLimit

Return Value

void

in Utils at line 46
void toUnitSize($bytes)

in Utils at line 82
void getExt(string $fileToUpload)

Get extension from path info

Parameters

string $fileToUpload

Return Value

void

in Utils at line 93
string getUploadedFileName()

Get filename of uploaded file

Return Value

string

in Utils at line 103
bool getUploadStatus()

Get uploaded status

Return Value

bool

in Utils at line 113
void cleanExifInfo()

Clean exif info modification from https://stackoverflow.com/a/38862429/13322576

Return Value

void

in Stream at line 22
void streamFile(string $filePath, string $callback = '')

Open and stream a file

Parameters

string $filePath
string $callback

Return Value

void

in Stream at line 54
void download(string $filePath)

Download somae file

Parameters

string $filePath

Return Value

void

at line 33
__construct(string $root, string $diskName)

Define adapter and filesystem

Parameters

string $root
string $diskName

at line 79
object as(string $newName)

Rename uploaded file with new name

Parameters

string $newName

Return Value

object