src/Filesystem/Adapter/Memory.php
protected function doListContents($directory, $recursive)
	{
		$filter = function ($path) use ($directory, $recursive) {
			// Remove the root directory from any listing.
			if ($path === '') {
				return false;
			}

			if (Util::dirname($path) === $directory) {
				return true;
			}

			return $recursive && $this->pathIsInDirectory($path, $directory);
		};

		return \array_filter(\array_keys($this->storage), $filter);
	}
protected function doListContents($directory, $recursive)
	{
		$filter = function ($path) use ($directory, $recursive) {
			// Remove the root directory from any listing.
			if ($path === '') {
				return false;
			}

			if (Util::dirname($path) === $directory) {
				return true;
			}

			return $recursive && $this->pathIsInDirectory($path, $directory);
		};

		return \array_filter(\array_keys($this->storage), $filter);
	}
protected function doListContents ( $ directory , $ recursive ) { $ filter = function ( $ path ) use ( $ directory , $ recursive ) { // Remove the root directory from any listing. if ( $ path === '' ) { return false ; } if ( Util :: dirname ( $ path ) === $ directory ) { return true ; } return $ recursive && $ this -> pathIsInDirectory ( $ path , $ directory ) ; } ; return \ array_filter ( \ array_keys ( $ this -> storage ) , $ filter ) ; }
Filters the file system returning paths inside the directory.

@param string $directory
@param bool   $recursive

@return string[]
Filters the file system returning paths inside the directory .