public function isfile(string $path): Promise
    {
        if (!@\file_exists($path)) {
            return new Success(false);
        }

        $isFile = @\is_file($path);
        \clearstatcache(true, $path);

        return new Success($isFile);
    }
public function isfile(string $path): Promise
    {
        if (!@\file_exists($path)) {
            return new Success(false);
        }

        $isFile = @\is_file($path);
        \clearstatcache(true, $path);

        return new Success($isFile);
    }
public function isfile ( string $ path ) : Promise { if ( ! @ \ file_exists ( $ path ) ) { return new Success ( false ) ; } $ isFile = @ \ is_file ( $ path ) ; \ clearstatcache ( true , $ path ) ; return new Success ( $ isFile ) ; }
Does the specified path exist and is it a file?

If the path does not exist the returned Promise will resolve
to FALSE. It will NOT reject with an error.

@param string $path An absolute file system path
@return \Amp\Promise<bool>
Does the specified path exist and is it a file?