static function resolveFileResolvable(string $file) {
        $rfile = @\realpath($file);
        if($rfile) {
            if(self::$filesystem) {
                return self::$filesystem->getContents($file);
            }
            
            return \React\Promise\resolve(\file_get_contents($rfile));
        } elseif(\filter_var($file, FILTER_VALIDATE_URL)) {
            return \CharlotteDunois\Yasmin\Utils\URLHelpers::resolveURLToData($file);
        }
        
        return \React\Promise\reject(new \RuntimeException('Given file is not resolvable'));
    }
static function resolveFileResolvable(string $file) {
        $rfile = @\realpath($file);
        if($rfile) {
            if(self::$filesystem) {
                return self::$filesystem->getContents($file);
            }
            
            return \React\Promise\resolve(\file_get_contents($rfile));
        } elseif(\filter_var($file, FILTER_VALIDATE_URL)) {
            return \CharlotteDunois\Yasmin\Utils\URLHelpers::resolveURLToData($file);
        }
        
        return \React\Promise\reject(new \RuntimeException('Given file is not resolvable'));
    }
static function resolveFileResolvable ( string $ file ) { $ rfile = @ \ realpath ( $ file ) ; if ( $ rfile ) { if ( self :: $ filesystem ) { return self :: $ filesystem -> getContents ( $ file ) ; } return \ React \ Promise \ resolve ( \ file_get_contents ( $ rfile ) ) ; } elseif ( \ filter_var ( $ file , FILTER_VALIDATE_URL ) ) { return \ CharlotteDunois \ Yasmin \ Utils \ URLHelpers :: resolveURLToData ( $ file ) ; } return \ React \ Promise \ reject ( new \ RuntimeException ( 'Given file is not resolvable' ) ) ; }
Resolves filepath and URL into file data - returns it if it's neither. Resolves with a string.
@param string  $file
@return \React\Promise\ExtendedPromiseInterface
Resolves filepath and URL into file data - returns it if it s neither . Resolves with a string .