Automattic\WooCommerce\Internal\Admin\Logging\FileV2

File::deletepublicWC 1.0

Delete the file from the filesystem.

Method of the class: File{}

No Hooks.

Returns

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

Usage

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

File::delete() code WC 10.3.5

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

	return $deleted;
}