\Iqrf\Repository\EntitiesFile

File entity

Summary

Methods
Properties
Constants
__construct()
fromArray()
getName()
getSize()
getDate()
getSha256()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(  name,   size,   date,   sha256) : 

Constructor

Parameters

name

File name

size

File size

date

File creation date

sha256

SHA256 hash of the file

Returns

fromArray()

fromArray(mixed|string|string|int  data) : \Iqrf\Repository\Entities\File

Creates a new file entity from an array

Parameters

mixed|string|string|int data

JSON data in an array

Returns

\Iqrf\Repository\Entities\File —

File entity

getName()

getName() : 

Returns the file name

Returns

File name

getSize()

getSize() : 

Returns the file size

Returns

File size

getDate()

getDate() : \DateTime

Returns the file creation date

Returns

\DateTime —

File creation date

getSha256()

getSha256() : 

Returns the SHA256 hash of the file

Returns

SHA256 hash of the file