Documentation

Delete

bool
CBXVirtualIo::Delete(
 string $path
);

The method deletes file or folder. Non-static method.

Parameters

Parameter Description
path Path

Example

$path = $io->RelativeToAbsolutePath($path);
$flTmp = $io->GetFile($path);
$flSzTmp = $flTmp->GetFileSize();
if ($io->Delete($path))
{
 if (COption::GetOptionInt("main", "disk_space") > 0)
  CDiskQuota::updateDiskQuota("file", $flSzTmp, "delete");
}


© «Bitrix24», 2001-2024
Up