PATH:
home
/
lab2454c
/
costbloc.com
/
vendor
/
league
/
flysystem
/
src
<?php declare(strict_types=1); namespace League\Flysystem; use ArrayIterator; use Generator; use IteratorAggregate; use Traversable; /** * @template T */ class DirectoryListing implements IteratorAggregate { /** * @param iterable<T> $listing */ public function __construct(private iterable $listing) { } public function filter(callable $filter): DirectoryListing { $generator = (static function (iterable $listing) use ($filter): Generator { foreach ($listing as $item) { if ($filter($item)) { yield $item; } } })($this->listing); return new DirectoryListing($generator); } public function map(callable $mapper): DirectoryListing { $generator = (static function (iterable $listing) use ($mapper): Generator { foreach ($listing as $item) { yield $mapper($item); } })($this->listing); return new DirectoryListing($generator); } public function sortByPath(): DirectoryListing { $listing = $this->toArray(); usort($listing, function (StorageAttributes $a, StorageAttributes $b) { return $a->path() <=> $b->path(); }); return new DirectoryListing($listing); } /** * @return Traversable<T> */ public function getIterator(): Traversable { return $this->listing instanceof Traversable ? $this->listing : new ArrayIterator($this->listing); } /** * @return T[] */ public function toArray(): array { return $this->listing instanceof Traversable ? iterator_to_array($this->listing, false) : (array) $this->listing; } }
[-] FileAttributes.php
[edit]
[-] UnableToCheckDirectoryExistence.php
[edit]
[-] UnableToListContents.php
[edit]
[-] UnableToMountFilesystem.php
[edit]
[-] UnableToDeleteDirectory.php
[edit]
[-] FilesystemWriter.php
[edit]
[-] UnableToCopyFile.php
[edit]
[+]
..
[-] StorageAttributes.php
[edit]
[-] FilesystemOperationFailed.php
[edit]
[-] Config.php
[edit]
[-] CorruptedPathDetected.php
[edit]
[-] UnableToMoveFile.php
[edit]
[-] CalculateChecksumFromStream.php
[edit]
[-] FilesystemReader.php
[edit]
[-] FilesystemException.php
[edit]
[-] UnreadableFileEncountered.php
[edit]
[-] SymbolicLinkEncountered.php
[edit]
[-] Visibility.php
[edit]
[-] ChecksumProvider.php
[edit]
[-] UnableToCheckFileExistence.php
[edit]
[-] ProxyArrayAccessToProperties.php
[edit]
[-] UnableToProvideChecksum.php
[edit]
[-] UnableToReadFile.php
[edit]
[-] WhitespacePathNormalizer.php
[edit]
[-] FilesystemAdapter.php
[edit]
[-] DirectoryListing.php
[edit]
[-] InvalidStreamProvided.php
[edit]
[-] UnableToWriteFile.php
[edit]
[+]
Local
[-] UnableToSetVisibility.php
[edit]
[-] DirectoryAttributes.php
[edit]
[-] ChecksumAlgoIsNotSupported.php
[edit]
[-] PortableVisibilityGuard.php
[edit]
[+]
UnixVisibility
[+]
UrlGeneration
[-] PathNormalizer.php
[edit]
[-] MountManager.php
[edit]
[-] UnableToRetrieveMetadata.php
[edit]
[-] InvalidVisibilityProvided.php
[edit]
[-] UnableToDeleteFile.php
[edit]
[-] UnableToGeneratePublicUrl.php
[edit]
[-] Filesystem.php
[edit]
[-] UnableToResolveFilesystemMount.php
[edit]
[-] FilesystemOperator.php
[edit]
[-] UnableToCreateDirectory.php
[edit]
[-] UnableToCheckExistence.php
[edit]
[-] UnableToGenerateTemporaryUrl.php
[edit]
[-] PathPrefixer.php
[edit]
[-] PathTraversalDetected.php
[edit]