public function \Bitrix\Main\IO\Directory::__construct( string $path string $siteId = nul );
Non-static method is called when creating a class instance, allowing to perform actions within it, when creating an object.
|$path||Full path to folder|
$directory=new \Bitrix\Main\IO\Directory($path, $siteId = null);
The following can be done with folder which path was passed to class constructor:
Check, if specified path exists:
Delete the folder and all its contents:
Returns array with object of Directory and File classes, inserted into the current directory. Without recursion.
Create subdirectory wit name, passed as parameter. Returns a created folder object:
Gets folder creation time. Here and later methods return the in the Unix timestamp format. Prints information on directory, specified when creating an object:
Gets time of the last access to folder:
Gets time of the last folder update:
Sets access permissions to folder:
Returns access permissions to folder: