Magento 2 can't provide directly to truncate resource collection.
Use Install/Upgrade Data script by using setup command
DB Adapter : Magento\Framework\DB\Adapter\AdapterInterface::truncateTable($tableName, $schemaName)
app/code/[vender_name]/[module_name]/setup/InstallData.php
namespace <vender>\<module>\Setup;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
/**
* Category attribute Upgrade Data script
* @codeCoverageIgnore
*/
class InstallData implements InstallDataInterface
{
/**
* {@inheritdoc}
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
$connection = $setup->getConnection();
// truncate table
$connection->truncateTable($tableName);
}
}