for backwards compatibility with vfsStreamFile::readUntilEnd()

@return  string
@internal
330201
public function readUntilEnd(): string
    {
        /** @var string|false $data */
        $data = substr($this->content(), $this->offset);
        return (false === $data) ? '' : $data;
    }
314771
public function getOutput(): string
    {
        $log_file = $this->config->getLogFile();
        if (!file_exists($log_file)) {
            $msg = "Server output log file does not exists '$log_file'";
            $this->logger->error("Get server output failed: $msg");
            throw new Exception\RuntimeException($msg);
        } elseif (!is_readable($log_file)) {
            $msg = "Cannot read log file do to missing read permission '$log_file'";
            $this->logger->error("Get server output failed: $msg");
            throw new Exception\RuntimeException($msg);
        }
        $output = file_get_contents($log_file);

        return $output;
    }
193895
public function getFileContents() : string
    {
        // No point in continuing if there is no file assigned to this frame.
        if (!$this->file || $this->file === 'Unknown') {
            return '';
        }

        // If the contents aren't cached yet, grab them into our rudimentary in-memory cache.
        // Note: This may cache a boolean false if the retrieval fails for whatever reason. We're gonna handle
        // that afterwards and return an empty string instead.
        if (!isset(static::$files[$this->file])) {
            static::$files[$this->file] = file_get_contents($this->file);
        }

        // Return the cached contents of the file or an empty string if no contents could be fetched.
        return static::$files[$this->file] ?: '';
    }
214880
public function read(int $length = null): string
    {
        // can not call fgets with null when not specified
        $data = null === $length ? fgets($this->resource) : fgets($this->resource, $length);
        if (false === $data) {
            // fgets() returns false on eof while feof() returned false before
            // but will now return true
            if ($this->eof()) {
                return '';
            }

            if (stream_get_meta_data($this->resource)['timed_out']) {
                throw new Timeout(
                        'Reading of ' . $length . ' bytes failed: timeout of '
                        . $this->timeout . ' seconds exceeded'
                );
            }

            throw new ConnectionFailure(
                    'Reading of ' . $length . ' bytes failed.'
            );
        }

        return $data;
    }
322366
public function getOnEmptyText()
    {
        static $warned;

        $dir = $this->getPath(false, 'index');

        if (! is_dir($dir)) {
            try {
                \MUtil_File::ensureDir($dir);

            } catch (\Zend_Exception $e) {
                $text = $e->getMessage();

                if (! $warned) {
                    $warned = true;
                    $this->addMessage($text);
                }
                return $text;
            }
        }

        return parent::getOnEmptyText();
    }
97403
public function stream_read($count)
    {
        if ($this->stream_eof()) {
            return false;
        }

        $out = '';
        $tmp = &$this->_data[$this->_datapos];

        while ($count) {
            if (!is_resource($tmp['fp'])) {
                return false;
            }

            $curr_read = min($count, $tmp['l'] - $tmp['p']);
            $out .= fread($tmp['fp'], $curr_read);
            $count -= $curr_read;
            $this->_position += $curr_read;

            if ($this->_position == $this->_length) {
                if ($count) {
                    $this->_ateof = true;
                    break;
                } else {
                    $tmp['p'] += $curr_read;
                }
            } elseif ($count) {
                if (!isset($this->_data[++$this->_datapos])) {
                    return false;
                }
                $tmp = &$this->_data[$this->_datapos];
                rewind($tmp['fp']);
                $tmp['p'] = 0;
            } else {
                $tmp['p'] += $curr_read;
            }
        }

        return $out;
    }
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;
  }
425685
public function stream_read($count) {
    assert(isset($this->client));
    return $this->client->read($count);
  }
426211
public function getClientFilename() : string
    {
        return ($this->clientFilename === null) ? $this->fileStream->getFilename() : $this->clientFilename;
    }
1034708
public function getFilesInUse()
    {
        $list = ArrayList::create();

        // Check SiteTreeFileExtension
        if ($this->owner instanceof Folder) {
            // Join on tracking table
            $parents = static::nestedFolderIDs($this->owner->ID);
            $linkQuery = FileLink::get()->sql($linkParams);
            $list = File::get()->filter('ParentID', $parents)
                ->innerJoin(
                    "({$linkQuery})",
                    '"File"."ID" = "FileLinkTracking"."LinkedID"',
                    'FileLinkTracking',
                    20,
                    $linkParams
                );
        }

        // Allow extension
        $this->owner->extend('updateFilesInUse', $list);
        return $list;
    }
276214
public function read()
	{
		
		$csvPath = self::buildCsvFilePath($this->prefectureCode);
		
		$buf = mb_convert_encoding(
			file_get_contents($csvPath), 
			mb_internal_encoding(), 
			'sjis-win'
		);
		
		return $buf;
		
	}
147788
private function getFileName()
    {
        --$this->currentFileIndex;
        do{
            ++$this->currentFileIndex;
            $fileName = $this->currentNoIndexFileName;
            if($this->currentFileIndex > 0)
            {
                $fileName .= '(' . $this->currentFileIndex . ')';
            }
            $fileName .= $this->currentFileExt;
        }while(is_file($fileName) && filesize($fileName) >= $this->maxSize);
        return $fileName;
    }
542469
public final function read($length): string
   {
       if (!$this->isReadable()) {
           throw new RuntimeException("Can't read: stream is not readable");
       }
       $read = (string) fread($this->stream, (int) $length);
       $this->meta["eof"] = !$read ? true : false;
       return $read;
   }
1257865
private function read(): string
    {
        $this->lastResponse = fread($this->stream, 1024); // Read up to 1KB
        $this->lastResponseCode = intval(explode(" ", $this->lastResponse)[0]);
        $this->lastResponseCode = $this->lastResponseCode > 0 ? $this->lastResponseCode : -1;
        return $this->lastResponse;
    }
716254
public function read()
    {
        $result = '';
        $ht = $this->getHTaccessFilename();
        $fs = $this->getFilesystem();
        if (@$fs->isFile($ht)) {
            $result = @$fs->get($ht);
            if ($result === false) {
                throw new Exception("Failed to read from file $ht");
            }
        }

        return $result;
    }
979351
public function filemtime()
	{
		if ($this->use_include_path) {
			return filemtime(stream_resolve_include_path($this->_fhandle));
		} else {
			return filemtime($this->_fhandle);
		}
	}
966614
public function getTotalCodeCoverage() {
		$totalStatements = 0;
		$totalCoveredStatements = 0;
		foreach ($this->getFiles() as $file) {
			$totalStatements += $file->getStatements();
			$totalCoveredStatements += $file->getCoveredStatements();
		}
		foreach ($this->getPackages() as $package) {
			foreach ($package->getFiles() as $file) {
				$totalStatements += $file->getStatements();
				$totalCoveredStatements += $file->getCoveredStatements();
			}
		}

		return ($totalCoveredStatements==0?0:\round(($totalCoveredStatements/$totalStatements)*100));
	}