63 $this->resource = $this->driver->fileOpen($this->path, $this->mode);
75 if (!$this->driver->isExists($this->path)) {
77 new \
Magento\Framework\
Phrase(
'The "%1" file doesn\'t exist.', [$this->path])
89 public function read($length)
91 return $this->driver->fileRead($this->resource, $length);
101 public function readAll($flag =
null, $context =
null)
103 return $this->driver->fileGetContents($this->path, $flag, $context);
115 return $this->driver->fileReadLine($this->resource, $length, $ending);
127 public function readCsv($length = 0, $delimiter =
',', $enclosure =
'"', $escape =
'\\')
129 return $this->driver->fileGetCsv($this->resource, $length, $delimiter, $enclosure, $escape);
139 return $this->driver->fileTell($this->resource);
149 public function seek($offset, $whence = SEEK_SET)
151 return $this->driver->fileSeek($this->resource, $offset, $whence);
161 return $this->driver->endOfFile($this->resource);
171 return $this->driver->fileClose($this->resource);
181 return $this->driver->stat($this->path);
seek($offset, $whence=SEEK_SET)
readCsv($length=0, $delimiter=',', $enclosure='"', $escape = '\\')
readAll($flag=null, $context=null)
readLine($length, $ending=null)
__construct($path, DriverInterface $driver)