final class UploadStorage (View source)

Methods

__construct(TranslatorInterface $translator, Filesystem $filesystem)
string
ensureTargetDirectory(string $targetDirectory)
string
string
buildRelativePath(string $targetRelativeDirectory, string $storedFilename)
string
string
generateFilename(string|null $extension = null)
string
string
buildPath(string $targetDirectory, string $storedFilename)
string
void
moveUploadedFile(UploadedFileInterface $file, string $storedPath)
void
int
fileSize(string $path)
int

Details

__construct

__construct(TranslatorInterface $translator, Filesystem $filesystem)

No description

Parameters

TranslatorInterface $translator
Filesystem $filesystem

ensureTargetDirectory

string ensureTargetDirectory(string $targetDirectory)

No description

Parameters

string $targetDirectory

Return Value

string

buildRelativePath

string buildRelativePath(string $targetRelativeDirectory, string $storedFilename)

No description

Parameters

string $targetRelativeDirectory
string $storedFilename

Return Value

string

generateFilename

string generateFilename(string|null $extension = null)

No description

Parameters

string|null $extension

Return Value

string

buildPath

string buildPath(string $targetDirectory, string $storedFilename)

No description

Parameters

string $targetDirectory
string $storedFilename

Return Value

string

moveUploadedFile

void moveUploadedFile(UploadedFileInterface $file, string $storedPath)

No description

Parameters

UploadedFileInterface $file
string $storedPath

Return Value

void

fileSize

int fileSize(string $path)

No description

Parameters

string $path

Return Value

int