Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DriverInterface.php
Go to the documentation of this file.
1 <?php
9 
11 
18 interface DriverInterface
19 {
26 
32  const WRITEABLE_FILE_MODE = 0660;
33 
40  public function isExists($path);
41 
49  public function stat($path);
50 
58  public function isReadable($path);
59 
67  public function isFile($path);
68 
76  public function isDirectory($path);
77 
87  public function fileGetContents($path, $flag = null, $context = null);
88 
96  public function isWritable($path);
97 
104  public function getParentDirectory($path);
105 
114  public function createDirectory($path, $permissions = 0777);
115 
123  public function readDirectory($path);
124 
132  public function readDirectoryRecursively($path = null);
133 
142  public function search($pattern, $path);
143 
153  public function rename($oldPath, $newPath, DriverInterface $targetDriver = null);
154 
164  public function copy($source, $destination, DriverInterface $targetDriver = null);
165 
175  public function symlink($source, $destination, DriverInterface $targetDriver = null);
176 
184  public function deleteFile($path);
185 
193  public function deleteDirectory($path);
194 
203  public function changePermissions($path, $permissions);
204 
214  public function changePermissionsRecursively($path, $dirPermissions, $filePermissions);
215 
224  public function touch($path, $modificationTime = null);
225 
235  public function filePutContents($path, $content, $mode = null);
236 
245  public function fileOpen($path, $mode);
246 
256  public function fileReadLine($resource, $length, $ending = null);
257 
266  public function fileRead($resource, $length);
267 
279  public function fileGetCsv($resource, $length = 0, $delimiter = ',', $enclosure = '"', $escape = '\\');
280 
288  public function fileTell($resource);
289 
299  public function fileSeek($resource, $offset, $whence = SEEK_SET);
300 
307  public function endOfFile($resource);
308 
316  public function fileClose($resource);
317 
326  public function fileWrite($resource, $data);
327 
338  public function filePutCsv($resource, array $data, $delimiter = ',', $enclosure = '"');
339 
347  public function fileFlush($resource);
348 
357  public function fileLock($resource, $lockMode = LOCK_EX);
358 
366  public function fileUnlock($resource);
367 
374  public function getAbsolutePath($basePath, $path, $scheme = null);
375 
380  public function getRealPath($path);
381 
388  public function getRealPathSafety($path);
389 
395  public function getRelativePath($basePath, $path = null);
396 }
getAbsolutePath($basePath, $path, $scheme=null)
$pattern
Definition: website.php:22
$source
Definition: source.php:23
$resource
Definition: bulk.php:12
fileSeek($resource, $offset, $whence=SEEK_SET)
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode
Definition: grid.phtml:15
rename($oldPath, $newPath, DriverInterface $targetDriver=null)
filePutContents($path, $content, $mode=null)
copy($source, $destination, DriverInterface $targetDriver=null)
changePermissionsRecursively($path, $dirPermissions, $filePermissions)
touch($path, $modificationTime=null)
fileLock($resource, $lockMode=LOCK_EX)
$permissions
symlink($source, $destination, DriverInterface $targetDriver=null)
fileGetContents($path, $flag=null, $context=null)
filePutCsv($resource, array $data, $delimiter=',', $enclosure='"')
createDirectory($path, $permissions=0777)
fileGetCsv($resource, $length=0, $delimiter=',', $enclosure='"', $escape = '\\')
fileReadLine($resource, $length, $ending=null)