Reads the file

@return  string
351230
public function readAndDelete()
	{
		if (!isset($this->contents))
		{
			$this->contents = $this->hasAdapterOrFail()->adapter->readAndDelete($this->getPath());
		}
		else
		{
			// We've already read it...so just go ahead and delete rather than reading again
			$this->delete();
		}

		return $this->contents;
	}
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;
    }
1023293
function _read()
    {
        $fp = @fopen($this->_file, "rb");
        if ($fp) {
	    if ($this->_fileLocking) @flock($fp, LOCK_SH);
            clearstatcache();
            $length = @filesize($this->_file);
            $mqr = get_magic_quotes_runtime();
            if ($mqr) {
                set_magic_quotes_runtime(0);
            }
            if ($this->_readControl) {
                $hashControl = @fread($fp, 32);
                $length = $length - 32;
            }

            if ($length) {
                $data = '';
                // See https://bugs.php.net/bug.php?id=30936
                // The 8192 magic number is the chunk size used internally by PHP.
                while(!feof($fp)) $data .= fread($fp, 8192);
            } else {
                $data = '';
            }
            if ($mqr) {
                set_magic_quotes_runtime($mqr);
            }
            if ($this->_fileLocking) @flock($fp, LOCK_UN);
            @fclose($fp);
            if ($this->_readControl) {
                $hashData = $this->_hash($data, $this->_readControlType);
                if ($hashData != $hashControl) {
                    if (!(is_null($this->_lifeTime))) {
                        @touch($this->_file, time() - 2*abs($this->_lifeTime)); 
                    } else {
                        @unlink($this->_file);
                    }
                    return false;
                }
            }
            return $data;
        }
        return $this->raiseError('Cache_Lite : Unable to read cache !', -2); 
    }
445124
public function getData()
    {
        $fp = $this->getStream();
        $data = '';

        while (feof($fp) === false) {
            $data .= fread($fp, self::CHUNK_SIZE);
        }

        @fclose($fp);

        return $data;
    }
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;
    }
707302
public function read() {
		
		$id = $this->getId();
		$path = $this->getPath($id);
		if (!is_readable($path)) {
			throw new Exception("Expected path $path is not readable");
		}

		return file_get_contents($path);
	}
737772
protected function read(): string
    {
        $s = '';
        while (($line = \fgets($this->connection, 1000)) != null) { // intentionally ==
            $s .= $line;
            if (isset($line[3]) && $line[3] === ' ') {
                break;
            }
        }

        return $s;
    }
1008686
public function canRead()
    {
        $ht = $this->getHTaccessFilename();
        $fs = $this->getFilesystem();
        if (@$fs->isFile($ht)) {
            $result = @is_readable($ht);
        } else {
            $result = @is_readable(@dirname($ht));
        }

        return $result;
    }
498294
public function read()
    {
        if (!file_exists($this->path)) {
            throw new \RuntimeException('Could not read ' . $this->path);
        }
        return file_get_contents($this->path);
    }
1311418
public function read()
    {
        $configuration = new Configuration();

        $options = [
            'focus' => [$configuration, 'setFocusPattern'],
            'skip' => [$configuration, 'setSkipPattern'],
            'grep' => [$configuration, 'setGrep'],
            'no-colors' => [$configuration, 'disableColors'],
            'force-colors' => [$configuration, 'enableColorsExplicit'],
            'bail' => [$configuration, 'stopOnFailure'],
            'configuration' => [$configuration, 'setConfigurationFile']
        ];

        if ($path = $this->input->getArgument('path')) {
            $configuration->setPath($path);
        }

        foreach ($options as $option => $callable) {
            $this->callForOption($option, $callable);
        }

        return $configuration;
    }
718660
public function read()
    {
        
        $translationUnits = array();
        
        try{
            $translationFile = $this->getTranslationFile();
        }
        catch (tao_helpers_translation_TranslationException $e){
            $translationFile = new tao_helpers_translation_RDFTranslationFile();
        }
        
        $this->setTranslationFile($translationFile);
        $inputFile = $this->getFilePath();
        
        if (file_exists($inputFile)){
            if (is_file($inputFile)){
                if (is_readable($inputFile)){
                    
                    try{
                        $doc = new DOMDocument('1.0', 'UTF-8');
                        $doc->load($inputFile);
                        $xpath = new DOMXPath($doc);
                        $rdfNS = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
                        $xmlNS = 'http://www.w3.org/XML/1998/namespace';
                        $xpath->registerNamespace('rdf', $rdfNS);
                        
                        $rootNodes = $xpath->query('//rdf:RDF');
                        if ($rootNodes->length == 1){
                            // Try to get annotations from the root node.
                            $sibling = $rootNodes->item(0)->previousSibling;
                            while ($sibling !== null){
                                if ($sibling instanceof DOMNode && $sibling->nodeType == XML_COMMENT_NODE){
                                    $annotations = tao_helpers_translation_RDFUtils::unserializeAnnotations($sibling->data);
                                    $translationFile->setAnnotations($annotations);
                                    
                                    if (isset($annotations['sourceLanguage'])){
                                        $translationFile->setSourceLanguage($annotations['sourceLanguage']);
                                    }
                                    
                                    if (isset($annotations['targetLanguage'])){
                                        $translationFile->setTargetLanguage($annotations['targetLanguage']);
                                    }
                                    
                                    break;
                                }
                                
                                $sibling = $sibling->previousSibling;
                            }
                            
                            $descriptions = $xpath->query('//rdf:Description');
                            foreach ($descriptions as $description){
                                if ($description->hasAttributeNS($rdfNS, 'about')){
                                    $subject = $description->getAttributeNS($rdfNS, 'about');
                                    
                                    // Let's retrieve properties.
                                    foreach ($description->childNodes as $property){
                                        if ($property->nodeType == XML_ELEMENT_NODE){
                                            // Retrieve namespace uri of this node.
                                            if ($property->namespaceURI != null){
                                                $predicate = $property->namespaceURI . $property->localName;
                                                
                                                // Retrieve an hypothetic target language.
                                                $lang = tao_helpers_translation_Utils::getDefaultLanguage();
                                                if ($property->hasAttributeNS($xmlNS, 'lang')){
                                                    $lang = $property->getAttributeNS($xmlNS, 'lang');
                                                }
                                                
                                                $object = $property->nodeValue;
                                                
                                                $tu = new tao_helpers_translation_RDFTranslationUnit('');
                                                $tu->setTargetLanguage($lang);
                                                $tu->setTarget($object);
                                                $tu->setSubject($subject);
                                                $tu->setPredicate($predicate);
                                                
                                                // Try to get annotations.
                                                $sibling = $property->previousSibling;
                                                while ($sibling !== null){
                                                    if ($sibling instanceof DOMNode && $sibling->nodeType == XML_COMMENT_NODE){
                                                        // We should have the annotations we are looking for.
                                                        $annotations = tao_helpers_translation_RDFUtils::unserializeAnnotations($sibling->data);
                                                        $tu->setAnnotations($annotations);
                                                        
                                                        // Set the found sources and sourcelanguages if found.
                                                        if (isset($annotations['source'])){
                                                            $tu->setSource($annotations['source']);
                                                        }
                                                    }
                                                    
                                                    $sibling = $sibling->previousSibling;
                                                }
                                                
                                                $translationUnits[] = $tu;
                                            }
                                        }
                                    }
                                }
                            }
    
                            $this->getTranslationFile()->addTranslationUnits($translationUnits);
                        }else{
                            throw new tao_helpers_translation_TranslationException("'${inputFile}' has no rdf:RDF root node or more than one rdf:RDF root node.");
                        }
                    }
                    catch (DOMException $e){
                        throw new tao_helpers_translation_TranslationException("'${inputFile}' cannot be parsed.");
                    }
                    
                }else{
                    throw new tao_helpers_translation_TranslationException("'${inputFile}' cannot be read. Check your system permissions.");
                }
            }else{
                throw new tao_helpers_translation_TranslationException("'${inputFile}' is not a file.");
            }
        }else{
            throw new tao_helpers_translation_TranslationException("The file '${inputFile}' does not exist.");
        }
        
    }
650925
private function read()
    {
        flock($this->file, LOCK_SH);
        rewind($this->file);
        $content = fgets($this->file);
        flock($this->file, LOCK_UN);

        $this->records = unserialize($content);
    }
606603
public function read()
    {
        $data = @fread($this->stream, 30000);

        if($data === false) return;
        $this->buffer .= $data;

        if(!is_null($this->status)) return;
        if(strlen($this->buffer) < 4) return;
        $end = strpos($this->buffer, "\r\n\r\n", 4);
        if($end === false) return;

        list($request, $headers) = $this->parse_header(substr($this->buffer, 0, $end));
        list($version, $status, $phrase) = explode(' ', $request, 3);
        $this->status = $status;
        $this->response_length = isset($headers['content-length'])? (int)$headers['content-length'][0] : 0;
    }
692934
protected function read()
	{
		if( $this->useCache )
		{
			$fileName	= $this->pathCache.basename( $this->fileName ).".cache";
			if( file_exists( $fileName ) && file_exists( $this->fileName ) && filemtime( $fileName ) == filemtime( $this->pathConfig.$this->fileName ) )
			{
				return $this->readCache( $fileName );
			}
			else
			{
				$this->readWDDX();
				return $this->writeCache( $fileName );
			}
		}
		return $this->readWDDX();

	}
754426
public function read()
    {
        $lines = readLines($this->fileName, $this->fileEncoding);
        $fetch = array();

        foreach ($lines as $line) {
            $fields = preg_split('/\s+/', $line);
            if (count($fields) == 3) {
                array_push(
                    $fetch,
                    array('url' => $fields[0],
                          'length' => $fields[1],
                          'filename' => $fields[2])
                );
            }
        }
        $this->data = $fetch;
    }
723720
public function actionReadFile() {
        $target_path = $this->get['path'];
        $target_fullpath = $this->getFullPath($target_path, true);
        Log::info('reading file "' . $target_fullpath . '"');

        if (is_dir($target_fullpath)) {
            $this->error('FORBIDDEN_ACTION_DIR');
        }

        // check if the name is not in "excluded" list
        if (!$this->is_allowed_name($target_fullpath, false)) {
            $this->error('INVALID_DIRECTORY_OR_FILE');
        }

        // check if file is readable
        if (!$this->has_system_permission($target_fullpath, ['r'])) {
            $this->error('NOT_ALLOWED_SYSTEM');
        }

        $filesize = filesize($target_fullpath);
        $length = $filesize;
        $offset = 0;

        if (isset($_SERVER['HTTP_RANGE'])) {
            if (!preg_match('/bytes=(\d+)-(\d+)?/', $_SERVER['HTTP_RANGE'], $matches)) {
                header('HTTP/1.1 416 Requested Range Not Satisfiable');
                header('Content-Range: bytes */' . $filesize);
                exit;
            }

            $offset = intval($matches[1]);

            if (isset($matches[2])) {
                $end = intval($matches[2]);
                if ($offset > $end) {
                    header('HTTP/1.1 416 Requested Range Not Satisfiable');
                    header('Content-Range: bytes */' . $filesize);
                    exit;
                }
                $length = $end - $offset;
            } else {
                $length = $filesize - $offset;
            }

            $bytes_start = $offset;
            $bytes_end = $offset + $length - 1;

            header('HTTP/1.1 206 Partial Content');
            // A full-length file will indeed be "bytes 0-x/x+1", think of 0-indexed array counts
            header('Content-Range: bytes ' . $bytes_start . '-' . $bytes_end . '/' . $filesize);
            // While playing media by direct link (not via FM) FireFox and IE doesn't allow seeking (rewind) it in player
            // This header can fix this behavior if to put it out of this condition, but it breaks PDF preview
            header('Accept-Ranges: bytes');
        }

        header('Content-Type: ' . mime_content_type($target_fullpath));
        header("Content-Transfer-Encoding: binary");
        header("Content-Length: " . $length);
        header('Content-Disposition: inline; filename="' . basename($target_fullpath) . '"');

        $fp = fopen($target_fullpath, 'r');
        fseek($fp, $offset);
        $position = 0;

        while ($position < $length) {
            $chunk = min($length - $position, 1024 * 8);

            echo fread($fp, $chunk);
            flush();
            ob_flush();

            $position += $chunk;
        }
        exit;
    }
1127460
private function readSourceFile()
    {
        if (null == $this->source) {
            $path = $this->getInputFile();
            if (null === $path) {
                throw new \RuntimeException("View input file not specified.");
            }
            try {
                $this->source = \file_get_contents($path);
            } catch (\Exception $e) {
                throw new \RuntimeException(sprintf('View "%s" file can not be read', $path));
            }
        }
        return $this->source;
    }