35 $fileExists = $this->driver->isExists($this->path);
36 if (!$fileExists && preg_match(
'/r/', $this->mode)) {
38 new \
Magento\Framework\
Phrase(
'The "%1" file doesn\'t exist.', [$this->path])
40 }
elseif ($fileExists && preg_match(
'/x/', $this->mode)) {
55 return $this->driver->fileWrite($this->resource,
$data);
58 new \
Magento\Framework\
Phrase(
'Cannot write to the "%1" file. %2', [$this->path, $e->getMessage()])
72 public function writeCsv(array
$data, $delimiter =
',', $enclosure =
'"')
75 return $this->driver->filePutCsv($this->resource,
$data, $delimiter, $enclosure);
78 new \
Magento\Framework\
Phrase(
'Cannot write to the "%1" file. %2', [$this->path, $e->getMessage()])
92 return $this->driver->fileFlush($this->resource);
95 new \
Magento\Framework\
Phrase(
'Cannot flush the "%1" file. %2', [$this->path, $e->getMessage()])
106 public function lock($lockMode = \LOCK_EX)
108 return $this->driver->fileLock($this->resource, $lockMode);
118 return $this->driver->fileUnlock($this->resource);
__construct($path, DriverInterface $driver, $mode)
elseif(isset( $params[ 'redirect_parent']))
writeCsv(array $data, $delimiter=',', $enclosure='"')