Documentation

deleteDirectory

resource public
\Bitrix\Main\IO\Directory::deleteDirectory(
 string $path
);

Static method recursively deletes directory at the specified full path to folder (in contrast to rmdir that requires preliminary cleaning of directory).

Similar to the method in the old core: DeleteDirFilesEx. DeleteDirFilesEx receives path from site root, and current method receives absolute path to file from server root.

Parameters

ParameterDescriptionVersion
$pathFull path to file.

Example



© «Bitrix24», 2001-2024
Up