protected function scandirTask(Context $context, string $path): \Generator
    {
        $entries = yield $this->pool->submit($context, new MethodCall(static::class, 'scandirJob', $path));
        
        if ($entries === null) {
            throw new FilesystemException(\sprintf('Failed to scan directory: "%s"', $path));
        }
        
        return $entries;
    }
protected function scandirTask(Context $context, string $path): \Generator
    {
        $entries = yield $this->pool->submit($context, new MethodCall(static::class, 'scandirJob', $path));
        
        if ($entries === null) {
            throw new FilesystemException(\sprintf('Failed to scan directory: "%s"', $path));
        }
        
        return $entries;
    }
protected function scandirTask ( Context $ context , string $ path ) : \ Generator { $ entries = yield $ this -> pool -> submit ( $ context , new MethodCall ( static :: class , 'scandirJob' , $ path ) ) ; if ( $ entries === null ) { throw new FilesystemException ( \ sprintf ( 'Failed to scan directory: "%s"' , $ path ) ) ; } return $ entries ; }
Scan the given directory for items.

@param Context $context Async execution context.
@param string $path Absolute path of the directory to be scanned.
@return array Absolute paths of all scanned items.

@throws FilesystemException When scanning the directory has failed.
Scan the given directory for items .