src/DocumentRoot.php
public function handleRequest(Request $request): Promise
    {
        $path = removeDotPathSegments($request->getUri()->getPath());

        return new Coroutine(
            ($fileInfo = $this->fetchCachedStat($path, $request))
                ? $this->respondFromFileInfo($fileInfo, $request)
                : $this->respondWithLookup($this->root . $path, $path, $request)
        );
    }
public function handleRequest(Request $request): Promise
    {
        $path = removeDotPathSegments($request->getUri()->getPath());

        return new Coroutine(
            ($fileInfo = $this->fetchCachedStat($path, $request))
                ? $this->respondFromFileInfo($fileInfo, $request)
                : $this->respondWithLookup($this->root . $path, $path, $request)
        );
    }
public function handleRequest ( Request $ request ) : Promise { $ path = removeDotPathSegments ( $ request -> getUri ( ) -> getPath ( ) ) ; return new Coroutine ( ( $ fileInfo = $ this -> fetchCachedStat ( $ path , $ request ) ) ? $ this -> respondFromFileInfo ( $ fileInfo , $ request ) : $ this -> respondWithLookup ( $ this -> root . $ path , $ path , $ request ) ) ; }
Respond to HTTP requests for filesystem resources.

@param Request $request Request to handle.

@return Promise
Respond to HTTP requests for filesystem resources .