Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
directoryentry.php
1<?php
2namespace Bitrix\Main\IO;
3
4abstract class DirectoryEntry
5 extends FileSystemEntry
6{
7 public function __construct($path, $siteId = null)
8 {
9 parent::__construct($path, $siteId);
10 }
11
12 public function create()
13 {
14 if ($this->isExists())
15 return;
16
17 $arMissingDirs = array($this->getName());
18 $dir = $this->getDirectory();
19 while (!$dir->isExists())
20 {
21 $arMissingDirs[] = $dir->getName();
22 $dir = $dir->getDirectory();
23 }
24
25 $arMissingDirs = array_reverse($arMissingDirs);
26 foreach ($arMissingDirs as $dirName)
27 $dir = $dir->createSubdirectory($dirName);
28 }
29
33 abstract public function getChildren();
34
39 abstract public function createSubdirectory($name);
40
41 public function isDirectory()
42 {
43 return true;
44 }
45
46 public function isFile()
47 {
48 return false;
49 }
50
51 public function isLink()
52 {
53 return false;
54 }
55}
createSubdirectory($name)
isDirectory()
create()
isFile()
isLink()
getChildren()
__construct($path, $siteId=null)
$path
getName()
$siteId
getDirectory()
isExists()