Get the position in the file stream

@return int
355402
public function getPos()
    {
        if ($this->_mode == 0) {
            if (feof($this->file)) {
                $stat = fstat($this->file);
                fseek($this->file, $stat['size']);
            }

            $pos = ftell($this->file);

            return $pos;
        } else {
            return 0;
        }
    }
931220
public function stream_stat()
    {
        $stat = $this->getStatTemplate();

        $stat[2] = $stat['mode'] = $this->stream instanceof ReadableStream
            ? 0100444  // S_IFREG & S_IRUSR & S_IRGRP & S_IROTH
            : 0100222; // S_IFREG & S_IWUSR & S_IWGRP & S_IWOTH
        $stat[7] = $stat['size'] = $this->stream->getSize();

        $file = $this->stream->getFile();

        if (isset($file->uploadDate) && $file->uploadDate instanceof UTCDateTime) {
            $timestamp = $file->uploadDate->toDateTime()->getTimestamp();
            $stat[9] = $stat['mtime'] = $timestamp;
            $stat[10] = $stat['ctime'] = $timestamp;
        }

        if (isset($file->chunkSize) && is_integer($file->chunkSize)) {
            $stat[11] = $stat['blksize'] = $file->chunkSize;
        }

        return $stat;
    }
146544
public function getSize()
    {
        // If the stream is a file based stream and local, then use fstat
        clearstatcache(true, $this->getPath());

        $info = $this->getInfo();

        if (isset($info['size'])) {
            $size = $info['size'];
        } else {
            $size = strlen((string) $this->toString());
        }

        return $size;
    }
364992
private function getSummaryPosition(): ?int
    {
        if ($this->summaryPosition === -1) {
            $this->summaryPosition = $this->loadSummaryPosition();
        }

        return $this->summaryPosition;
    }
1205949
public function peek()
    {
        if($this->getType() == 'memory') {
            $position =  $this->_position;
        } else {
            $position = parent::peek();
        }

        return $position;
    }
1161545
public function elementEndPosition(){
        if($this->numberOfPages() == $this->currentPage){
            return $this->totalAmount - (1 - $this->startPosition);
        }else{
            return $this->elementStartPosition() + $this->amountPerPage - 1;
        }
    }
70391
public function getWidth() : int {
        $first = $this->getStart();
        $last = $this->getEndPosition();

        return $last - $first;
    }
593790
@Override
    public int position() {
        // if we are in transferTo mode, then this is the FileChannel position
        if (isFCEnabled()) {
            try {
                return (int) fc.position();
            } catch (IOException e) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Exception in position(): " + e);
                }
                FFDCFilter.processException(e, CLASS_NAME + ".position", "656", this);
                throw new RuntimeException(e);
            }
        }
        return super.position();
    }
943993
protected function getEOF() {
    $num = count($this->files);
    $eof = pack(
      'VvvvvVVv',
      0x06054b50,             // Signature
      0x00,                   // Number of this disk
      0x00,                   // Disk where central dir starts
      $num,                   // Number of central dirs on this disk
      $num,                   // Total central dirs
      $this->centralLength,   // Length of central dir.
      $this->localOffset,     // Offset to first centralHeader
      0                       // Comment length
    );

    return $eof;
  }
1179306
private function loadBlockEndPosition(): ?int
    {
        $endPos = $this->file->findPrevious(
            [T_DOC_COMMENT_CLOSE_TAG],
            $this->stackPos - 1,
            // Search till the next method, property, etc ...
            TokenHelper::findPreviousExcluding(
                $this->file,
                TokenHelper::$ineffectiveTokenCodes + Tokens::$methodPrefixes,
                $this->stackPos - 1
            )
        );

        return ((int) $endPos) > 0 ? $endPos : null;
    }
89487
public function fileatime()
	{
		if ($this->use_include_path) {
			return fileatime(stream_resolve_include_path($this->_fhandle));
		} else {
			return fileatime($this->_fhandle);
		}
	}
1084742
public function tell() {
    if (strlen($this->read_buffer) == 0) {
      return $this->next_read_position;
    } else {
      return $this->buffer_read_position + $this->object_block_start_position;
    }
  }
1124820
public function getTotalLength()
    {
        if ($this->totalLength === null) {
            $stat = \fstat($this->stream);
            $this->totalLength = $stat['size'];
        }

        return $this->totalLength;
    }
1013672
public function currentPosition()
    {
        $parent = $this->parent();
        $collection = $parent ? $parent->collection('content', false) : null;
        if ($collection instanceof Collection) {
            return $collection->currentPosition($this->path());
        }

        return 1;
    }
141804
public function getSize()
    {
        if (!$this->stream) {
            return null;
        }

        $stats = fstat($this->stream);
        if (isset($stats['size'])) {
            return $stats['size'];
        }

        return null;
    }
15012
public function getReadHandler()
    {
        if (null === $this->stream) {
            $this->stream = fopen($this->uri, 'r');
        }
        return $this->stream;
    }
519541
public long getPosition() {
		try {
			return reader.getFilePointer();
		} catch (IOException ex) {
			logger.logp(Level.SEVERE, className, "getPosition", "HPEL_ErrorReadingFileOffset", new Object[]{file, ex.getMessage()});
		}
		return -1L;
	}