GetDirectory
CBXVirtualDirectory CBXVirtualIo::GetDirectory( string $path );
The method returns a folder class object for a specified path. Receives absolute path on input. Existence of folder is not checked. Non-static method.
Parameters
Parameter | Description |
---|---|
path | Path |
Example
$dir = $io->GetDirectory($io->RelativeToAbsolutePath("/folder1/folder2")); $arChildren = $dir->GetChildren(); foreach ($arChildren as $child) { if (!$child->IsDirectory() && $child->GetName() != ".access.php") die("Error"); }
© «Bitrix24», 2001-2024