Automattic\WooCommerce\Internal\Admin\Logging\FileV2

File::delete()publicWC 1.0

Delete the file from the filesystem.

Метод класса: File{}

Хуков нет.

Возвращает

true|false. True on success, false on failure.

Использование

$File = new File();
$File->delete(): bool;

Код File::delete() WC 9.7.1

public function delete(): bool {
	try {
		$filesystem = FilesystemUtil::get_wp_filesystem();
		$deleted    = $filesystem->delete( $this->path, false, 'f' );
	} catch ( Exception $exception ) {
		return false;
	}

	return $deleted;
}