com\setasign\SetaFramework\FileSystem

File Interface File

File: /SetaFramework/src/FileSystem/File.php

Implemented in

Summary

Methods

getContentType()

abstract public File::getContentType (
void
): string

Get the content type.

getFileContent()

abstract public File::getFileContent (
void
): string|\Psr\Http\Message\StreamInterface|resource|FilePath

Get the content of the file.

getFileContentAsString()

abstract public File::getFileContentAsString (
void
): string

Get the content of the file as a string.

Please note: This method may cost much memory if the file is big.

getFileName()

abstract public File::getFileName (
void
): string

Get the file name

getFileSize()

abstract public File::getFileSize (
void
): int

withFileName()

abstract public File::withFileName (
string $newFileName
): File

Returns a new instance of the file with another file name.

Parameters
$newFileName : string