Wipe entire logical drives
Having a way to conveniently wipe a logical drive can be very helpful for users especially when trying to wipe a thumb drive or other external storage devices.
And maybe with this step :
- Initialize
- Load Drive
- Check Drive Type, make sure it's not System drive.
- Calculate Size, make sure User concern about the data.
- Confirm Wipe out {0} In Size.
- Wiping Out Asynchronously
- Done, give message to User
@rasyidf thank you for your suggestion, would you like to implement it? I'll help you along the way 😁
@encrypt0r No Problem, working on it.
Ah, It seems the program structure is too complicated to just add a feature.
maybe we could discuss here:
What approach will be used as this operation:
- [ ] Users Drag and Drop Logical.
- [ ] Add New Wizard for Listing Drives.
@rasyidf I agree it takes a while to get familiarized with the code base, so why don't we start with something that might not need to change the UI very much. Create a ShredDriveAsync method in ShredderService. The algorithm could look like this:
- Make sure the drive is not on an SSD (Use
ShredderService.IsDriveSSDfor that). Here is why. Also make sure the drive is not the system drive, we don't want the user to mess up their computer. - Fill up the free space on the drive by generating junk files. You can take a look at
ShredderService.OverWriteFilefor more information about that. You can either reuse it, or write a new method that creates a new file with arbitary length that that contains random bytes and has a random name. - After all of the drives space is used up, delete all of the generated files (a simple delete would do).
- Shred all of the folders on the drive by using
ShredderService.ShredFolderAsync - Shred all of the files in the root of the drive (the files in the folders are already taken care of by
ShredFolderAsync) by usingShredderService.ShredFileAsync.
After this step is done, then we can integrate it into the UI, in the meantime, you can create a temp button for yourself while you're testing the new feature.