GetChildren
array CBXVirtualDirectory::GetChildren( );
The method returns folder content as an array. Array elements are instances of CBXVirtualDirectory and CBXVirtualFile classes. Non-static method.
Examples
$dir = $io->GetDirectory($io->RelativeToAbsolutePath("/folder1/folder2")); $arChildren = $dir->GetChildren(); foreach ($arChildren as $child) { if (!$child->IsDirectory()) { echo "Folder has the file ".$child->GetName()." size ".$child->GetFileSize()."
"; } if ($child->IsDirectory()) { echo "Folder has subfolder ".$child->GetName()."
"; } }
© «Bitrix24», 2001-2024