Methods

pathinfo()

pathinfo(string  $path) : array

Get normalized pathinfo.

Parameters

string $path

Returns

array —

pathinfo

normalizeDirname()

normalizeDirname(string  $dirname) : string

Normalize a dirname return value.

Parameters

string $dirname

Returns

string —

normalized dirname

dirname()

dirname(string  $path) : string

Get a normalized dirname from a path.

Parameters

string $path

Returns

string —

dirname

map()

map(array  $object, array  $map) : array

Map result arrays.

Parameters

array $object
array $map

Returns

array —

mapped result

normalizePath()

normalizePath(string  $path) : string

Normalize path.

Parameters

string $path

Throws

\LogicException

Returns

string —

normalizeRelativePath()

normalizeRelativePath(string  $path) : string

Normalize relative directories in a path.

Parameters

string $path

Throws

\LogicException

Returns

string —

normalizePrefix()

normalizePrefix(string  $prefix, string  $separator) : string

Normalize prefix.

Parameters

string $prefix
string $separator

Returns

string —

normalized path

contentSize()

contentSize(string  $contents) : int

Get content size.

Parameters

string $contents

Returns

int —

content size

guessMimeType()

guessMimeType(string  $path, string|resource  $content) : string|null

Guess MIME Type based on the path of the file and it's content.

Parameters

string $path
string|resource $content

Returns

string|null —

MIME Type or NULL if no extension detected

emulateDirectories()

emulateDirectories(array  $listing) : array

Emulate directories.

Parameters

array $listing

Returns

array —

listing with emulated directories

ensureConfig()

ensureConfig(null|array|\League\Flysystem\Config  $config) : \League\Flysystem\Config

Ensure a Config instance.

Parameters

null|array|\League\Flysystem\Config $config

Throws

\LogicException

Returns

\League\Flysystem\Config —

config instance

rewindStream()

rewindStream(resource  $resource) : mixed

Rewind a stream.

Parameters

resource $resource

Returns

mixed —

isSeekableStream()

isSeekableStream(mixed  $resource) : mixed

Parameters

mixed $resource

Returns

mixed —

getStreamSize()

getStreamSize(resource  $resource) : int

Get the size of a stream.

Parameters

resource $resource

Returns

int —

stream size

removeFunkyWhiteSpace()

removeFunkyWhiteSpace(string  $path) : string

Removes unprintable characters and invalid unicode characters.

Parameters

string $path

Returns

string —

$path

emulateObjectDirectories()

emulateObjectDirectories(array  $object, array  $directories, array  $listedDirectories) : array

Emulate the directories of a single object.

Parameters

array $object
array $directories
array $listedDirectories

Returns

array —

basename()

basename(string  $path) : string

Returns the trailing name component of the path.

Parameters

string $path

Returns

string —