Documentation

Directory

Directory class for handling directories.

Method Description Available from version
Constructor Creates a class instance.
createDirectory Creates a directory.
deleteDirectory Deletes a directory by specified full path to folder.
isDirectoryExists Defines if folder exist.

Example

use Bitrix\Main\Application;
use Bitrix\Main\IO\Directory;
use Bitrix\Main\IO\File;

Directory::createDirectory(
    Application::getDocumentRoot() . "/foo/bar/baz/"
);

Directory::deleteDirectory(
    Application::getDocumentRoot() . "/foo/bar/baz/"
);

© «Bitrix24», 2001-2022
Up