lib/components/dataInterface/connectors/file/SourceFile.php
public function getFilePointer()
    {
        if (!isset($this->_filePointer)) {
            ini_set('auto_detect_line_endings', true);
            $this->_filePointer = false;
            $file = null;
            if (isset($this->local) && file_exists($this->local)) {
                $file = $this->local;
                $pathinfo = pathinfo($this->local);
            } elseif (isset($this->url)) {
                $fileCacheKey = md5(__CLASS__ . __FUNCTION__ . $this->url);
                $fileContent = Yii::$app->fileCache->get($fileCacheKey);
                $pathinfo = pathinfo($this->url);
                $file = Yii::$app->fileStorage->getTempFile(false, $pathinfo['extension']);
                if ($fileContent) {
                    file_put_contents($file, $fileContent);
                } else {
                    if (!$this->downloadFile($this->url, $file)) {
                        $file = null;
                    } else {
                        Yii::$app->fileCache->set($fileCacheKey, file_get_contents($file), 86400);
                    }
                }
            }
            if (isset($file)) {
                $file = $this->normalizeFile($file);
            }
            if (file_exists($file)) {
                $this->_filePointer = fopen($file, 'r');
            }
        }

        return $this->_filePointer;
    }
public function getFilePointer()
    {
        if (!isset($this->_filePointer)) {
            ini_set('auto_detect_line_endings', true);
            $this->_filePointer = false;
            $file = null;
            if (isset($this->local) && file_exists($this->local)) {
                $file = $this->local;
                $pathinfo = pathinfo($this->local);
            } elseif (isset($this->url)) {
                $fileCacheKey = md5(__CLASS__ . __FUNCTION__ . $this->url);
                $fileContent = Yii::$app->fileCache->get($fileCacheKey);
                $pathinfo = pathinfo($this->url);
                $file = Yii::$app->fileStorage->getTempFile(false, $pathinfo['extension']);
                if ($fileContent) {
                    file_put_contents($file, $fileContent);
                } else {
                    if (!$this->downloadFile($this->url, $file)) {
                        $file = null;
                    } else {
                        Yii::$app->fileCache->set($fileCacheKey, file_get_contents($file), 86400);
                    }
                }
            }
            if (isset($file)) {
                $file = $this->normalizeFile($file);
            }
            if (file_exists($file)) {
                $this->_filePointer = fopen($file, 'r');
            }
        }

        return $this->_filePointer;
    }
Get file pointer.

@return [[@doctodo return_type:getFilePointer]] [[@doctodo return_description:getFilePointer]]