final class Filesystem (View source)

Methods

__construct(DirectoryManagerInterface $directoryManager, FileManagerInterface $fileManager, LockManagerInterface $lockManager)
void
create(string $path, int $mode = 0775)
void
void
delete(string $path)
void
void
copy(string $src, string $dst, bool $overwrite = false)
void
void
write(string $file, string $data, int|null $mode = 0666)
void
stream(string $path, bool $recursive = true)
find(string $pattern, string $path)
tree(string $path, bool $recursive = true)
string
read(string $file)
string
int
size(string $file)
int
int
modified(string $file)
int
string
hash(string $file, string $algo = 'sha256')
string
string
mime(string $file)
string
int
permissions(string $file)
int
mixed
lock(string $file, callable $callback)
mixed

Details

__construct

__construct(DirectoryManagerInterface $directoryManager, FileManagerInterface $fileManager, LockManagerInterface $lockManager)

No description

Parameters

DirectoryManagerInterface $directoryManager
FileManagerInterface $fileManager
LockManagerInterface $lockManager

getDirectoryManager

DirectoryManagerInterface getDirectoryManager()

No description

getFileManager

FileManagerInterface getFileManager()

No description

Return Value

FileManagerInterface

getLockManager

LockManagerInterface getLockManager()

No description

Return Value

LockManagerInterface

create

void create(string $path, int $mode = 0775)

No description

Parameters

string $path
int $mode

Return Value

void

delete

void delete(string $path)

No description

Parameters

string $path

Return Value

void

copy

void copy(string $src, string $dst, bool $overwrite = false)

No description

Parameters

string $src
string $dst
bool $overwrite

Return Value

void

write

void write(string $file, string $data, int|null $mode = 0666)

No description

Parameters

string $file
string $data
int|null $mode

Return Value

void

stream

Generator stream(string $path, bool $recursive = true)

No description

Parameters

string $path
bool $recursive

Return Value

Generator

find

Generator find(string $pattern, string $path)

No description

Parameters

string $pattern
string $path

Return Value

Generator

tree

Generator tree(string $path, bool $recursive = true)

No description

Parameters

string $path
bool $recursive

Return Value

Generator

read

string read(string $file)

No description

Parameters

string $file

Return Value

string

size

int size(string $file)

No description

Parameters

string $file

Return Value

int

modified

int modified(string $file)

No description

Parameters

string $file

Return Value

int

hash

string hash(string $file, string $algo = 'sha256')

No description

Parameters

string $file
string $algo

Return Value

string

mime

string mime(string $file)

No description

Parameters

string $file

Return Value

string

permissions

int permissions(string $file)

No description

Parameters

string $file

Return Value

int

lock

mixed lock(string $file, callable $callback)

No description

Parameters

string $file
callable $callback

Return Value

mixed