Returns whether or not the stream is seekable.

note: StreamWrapper implementations have no control over
the "seekable" property of stream_get_meta_data()
and always advertise themselves as seekable.

@return bool
774534
function isSeekable()
    {
        if (!$this->_assertUsable())
            return false;

        if ($this->getMetadata('wrapper_type')) {
            // This is a wrapper resource; challenge seekable ...
            $pos = $this->tell();
            if (-1 === @fseek($this->rHandler, $pos, SEEK_SET))
                return false;
        }

        return $this->getMetadata('seekable');
    }
1236378
def is_streamable(self):
        """"""

        doc = self._request(self.ws_prefix + ".getInfo", True)
        return _extract(doc, "streamable") == "1"
983138
public function isDisplayable() {
        $displayable = $this->enable && $this->visible;
        if (true === $displayable) {
            return true;
        }
        foreach ($this->getNodes() as $current) {
            if (false === ($current instanceof AbstractNavigationNode)) {
                continue;
            }
            if (true === $current->isDisplayable()) {
                return true;
            }
        }
        return $displayable;
    }
1011541
public static function isNewestVersionAvailable()
    {
        $latestVersion = self::getLatestVersion();
        if (!empty($latestVersion)
            && version_compare(Version::VERSION, $latestVersion) == -1
        ) {
            return $latestVersion;
        }
        return false;
    }
101538
public function isEnable()
    {
        if (!$this->mPDFExists() || !$this->collection()->getSize()) {
            return false;
        }

        return $this->hasConfig(self::ENABLE);
    }
503995
public function isWritable()
    {
        if (!$this->isValidResource($this->resource)) {
            return false;
        }

        $meta = stream_get_meta_data($this->resource);
        $mode = $meta['mode'];

        return (
            strstr($mode, 'x')
            || strstr($mode, 'w')
            || strstr($mode, 'c')
            || strstr($mode, 'a')
            || strstr($mode, '+')
        );
    }
41545
public function isWritable()
    {
        return in_array($this->mode, [
            StreamMode::WRITE_CLEAN,
            StreamMode::WRITE_END,
            StreamMode::CREATE_READ_WRITE,
            StreamMode::CREATE_WRITE,
            StreamMode::READ_WRITE,
            StreamMode::READ_WRITE_CLEAN,
            StreamMode::READ_WRITE_END,
        ]);
    }
208345
public function isPassedByReference()
    {
        if ($class = $this->reflection->getClass()
            and $class->isTrait()
        ) {
            return true;
        }
        if ($class = $this->reflection->getClass()) {
            $reflection = (new ReflectionClass($class))->getConstructor();
            foreach ($reflection->getParameters() as $param) {
                if (!$param->isDefaultValueAvailable()) {
                    return true;
                }
            }
            return false;
        }
        if ($this->reflection->isDefaultValueAvailable()) {
            return false;
        }
        // No default defined, but let's see if we can guess...
        if ($this->reflection->isArray()) {
            return false;
        }
        if (version_compare(phpversion(), '7.0', '>=')
            and $type = $this->reflection->getType()
        ) {
            return false;
        }
        if ($extracted = $this->extractParameterData()) {
            return false;
        }
        return true;
    }
957557
private function readObject() {

        $inString = false;

        while ($this->getStream() || !$this->arrayEnd) {
            for(; $this->cursor < strlen($this->stream); $this->cursor++) {

                $this->jumpCursor();

                switch($this->stream{$this->cursor}) {
                    case '"':
                        $inString = !$inString;
                        break;
                    case "{":
                        if($inString) break;
                        $this->openingBrackets++;
                        break;
                    case "}":
                        if($inString) break;
                        $this->closingBrackets++;
                        break;
                }

                // If condition is met return data back to user for manipulation.
                if($this->openingBrackets == $this->closingBrackets && $this->openingBrackets != 0) {
                    return true;
                }

            }
        }

        return false;
    }
617846
public function isStream()
    {
        if ($this->data instanceof StreamInterface) {
            return true;
        }

        if (!is_resource($this->data)) {
            return false;
        }

        if (get_resource_type($this->data) !== 'stream') {
            return false;
        }

        return true;
    }
160546
public function hasStream($stream)
    {
        $isInputStream = $stream == $this->getInputStream();
        $isOutputStream = $stream == $this->getOutputStream();
        $isErrStream = $stream == $this->getErrorStream();

        return $isInputStream || $isOutputStream || $isErrStream;
    }
786302
def file_is_seekable(f):
	'''
	
	'''
	try:
		f.tell()
		logger.info("File is seekable!")
	except IOError, e:
		if e.errno == errno.ESPIPE:
			return False
		else:
			raise
	return True
201640
public function isSeekable()
    {
        if (!$this->isValidResource($this->resource)) {
            return false;
        }

        $meta = stream_get_meta_data($this->resource);

        return $meta['seekable'];
    }
472705
public function isWritable(): bool
    {
        if (!file_exists($this->filepath)) {
            return $this->isWritablePath($this->getPath());
        }

        return is_writable($this->filepath) && is_file($this->filepath);
    }
6190
public function getSize()
    {
        $size = $this->stream->getSize();
        if ($size === null) {
            // this shouldn't happen on a seekable stream I don't think...
            $pos = $this->stream->tell();
            $this->stream->seek(0, SEEK_END);
            $size = $this->stream->tell();
            $this->stream->seek($pos);
        }
        if ($this->limit === -1) {
            return $size - $this->offset;
        } else {
            return min([$this->limit, $size - $this->offset]);
        }
    }
1324159
public function isWritable()
    {
        if (is_resource($this->stream) === true) {
            $metadata = $this->getMetadata();
            return Validator::isWritable($metadata);
        }
        return false;
    }
817372
public function isWritable()
    {
        if (!is_resource($this->resource)) {
            return false;
        }

        $meta = stream_get_meta_data($this->resource);

        return is_writable($meta['uri']);
    }