Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
directoryentry.php
1
<?php
2
namespace
Bitrix\Main\IO
;
3
4
abstract
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
}
Bitrix\Main\IO\DirectoryEntry
Definition
directoryentry.php:6
Bitrix\Main\IO\DirectoryEntry\createSubdirectory
createSubdirectory($name)
Bitrix\Main\IO\DirectoryEntry\isDirectory
isDirectory()
Definition
directoryentry.php:41
Bitrix\Main\IO\DirectoryEntry\create
create()
Definition
directoryentry.php:12
Bitrix\Main\IO\DirectoryEntry\isFile
isFile()
Definition
directoryentry.php:46
Bitrix\Main\IO\DirectoryEntry\isLink
isLink()
Definition
directoryentry.php:51
Bitrix\Main\IO\DirectoryEntry\getChildren
getChildren()
Bitrix\Main\IO\DirectoryEntry\__construct
__construct($path, $siteId=null)
Definition
directoryentry.php:7
Bitrix\Main\IO\FileSystemEntry
Definition
filesystementry.php:7
Bitrix\Main\IO\FileSystemEntry\$path
$path
Definition
filesystementry.php:8
Bitrix\Main\IO\FileSystemEntry\getName
getName()
Definition
filesystementry.php:56
Bitrix\Main\IO\FileSystemEntry\$siteId
$siteId
Definition
filesystementry.php:11
Bitrix\Main\IO\FileSystemEntry\getDirectory
getDirectory()
Definition
filesystementry.php:71
Bitrix\Main\IO\FileSystemEntry\isExists
isExists()
Bitrix\Main\IO
Definition
directory.php:2
modules
main
lib
io
directoryentry.php
Создано системой
1.10.0