Cloud
Delete all files and folders from the trash

Delete all files and folders from the trash

The secrecyClient.cloud.emptyTrash permanently removes all files and folders from the cloud trash. It does not take any parameters.

cloud.ts
const deleteAllFilesAndFoldersFromTrash = async (): Promise<boolean> => {
  // First we need to check if the secrecyClient is available
  if (!secrecyClient) {
    return false;
  }
 
  try {
    const isDeleted = await secrecyClient.cloud.emptyTrash();
    return isDeleted;
  } catch (error) {
    console.error(error);
    return false;
  }
};