classe S3Service implémente ServiceInterface (Voir la source)

Méthodes

configure(array $config)

S3Service Configuration

static S3Service
getInstance()

Get S3Service

array|bool
store(UploadFile $file, string|null $location = null, array $option = [])

Function to upload a file

bool
append(string $filename, string $content)

Add content after the contents of the file

bool
prepend(string $filename, string $content)

Add content before the contents of the file

bool
put(string $file, string $content, array $options = [])

Put other file content in given file

bool
delete(string|array $filename)

Delete file or directory

array
files(string $dirname)

List the files of a folder passed as a parameter

array
directories(string $dirname)

List the folder of a folder passed as a parameter

bool
makeDirectory(string $bucket, int $mode = 0777, array $option = [])

Create a directory

string|null
get(string $filename)

Recover the contents of the file

bool
copy(string $source, string $target)

Copy the contents of a source file to a target file.

bool
move(string $source, string $target)

Renames or moves a source file to a target file.

bool
exists(string $filename)

Check the existence of a file

bool
isFile(string $filename)

isFile alias of is_file.

bool
isDirectory(string $dirname)

isDirectory alias of is_dir.

string
path(string $filename)

Resolves file path.

Détails

static FilesystemInterface configure(array $config)

S3Service Configuration

Paramètres

array $config

Valeur de retour

FilesystemInterface

static S3Service getInstance()

Get S3Service

Valeur de retour

S3Service

array|bool store(UploadFile $file, string|null $location = null, array $option = [])

Function to upload a file

Paramètres

UploadFile $file
string|null $location
array $option

Valeur de retour

array|bool

Exceptions

InvalidArgumentException

bool append(string $filename, string $content)

Add content after the contents of the file

Paramètres

string $filename
string $content

Valeur de retour

bool

bool prepend(string $filename, string $content)

Add content before the contents of the file

Paramètres

string $filename
string $content

Valeur de retour

bool

Exceptions

bool put(string $file, string $content, array $options = [])

Put other file content in given file

Paramètres

string $file
string $content
array $options

Valeur de retour

bool

bool delete(string|array $filename)

Delete file or directory

Paramètres

string|array $filename

Valeur de retour

bool

array files(string $dirname)

List the files of a folder passed as a parameter

Paramètres

string $dirname

Valeur de retour

array

array directories(string $dirname)

List the folder of a folder passed as a parameter

Paramètres

string $dirname

Valeur de retour

array

bool makeDirectory(string $bucket, int $mode = 0777, array $option = [])

Create a directory

Paramètres

string $bucket
int $mode
array $option

Valeur de retour

bool

string|null get(string $filename)

Recover the contents of the file

Paramètres

string $filename

Valeur de retour

string|null

bool copy(string $source, string $target)

Copy the contents of a source file to a target file.

Paramètres

string $source
string $target

Valeur de retour

bool

bool move(string $source, string $target)

Renames or moves a source file to a target file.

Paramètres

string $source
string $target

Valeur de retour

bool

bool exists(string $filename)

Check the existence of a file

Paramètres

string $filename

Valeur de retour

bool

bool isFile(string $filename)

isFile alias of is_file.

Paramètres

string $filename

Valeur de retour

bool

bool isDirectory(string $dirname)

isDirectory alias of is_dir.

Paramètres

string $dirname

Valeur de retour

bool

string path(string $filename)

Resolves file path.

Give the absolute path of a path

Paramètres

string $filename

Valeur de retour

string