C# - 删除文件永久 [英] C# - Deleting a file permanently
问题描述
我已经出了C#游戏一段时间,因为我开始iPhone的东西,但你怎么能彻底删除该文件(所以它不是存储在内存中),而不是可恢复。如果你不能永久删除它可以你争我夺它与随机数据,因此其未开封的,但仍然存在?
I've been out of the C# game for a while since I started iPhone stuff, But how can you delete a file completely (so its not stored in memory) and isn't recoverably. If you cant delete it forever can you scramble it up with random data so its un-openable but still exists?
谢谢!
推荐答案
这当然可能覆盖一个文件,使以前的内容无法恢复。但是,这必须由驱动器本身来完成,以确保正确的块被覆盖C#与文件系统,而不是物理块交互,因此不会提供任何安全性。
It's certainly possible to overwrite a file so that the previous content cannot be recovered. But this has to be done by the drive itself to make sure the correct block is overwritten... C# interacts with the filesystem, not physical blocks, so won't provide any security.
问一个驱动器安全擦除一些实际的方式与界面变化(ATAPI VS SATA,VS USB大容量存储VS SCSI VS火线)和C#不提供在这个级别居高临下的简单方法。
The actual way to ask a drive to securely erase something varies with interface (ATAPI vs SATA, vs USB mass-storage vs SCSI vs firewire), and C# doesn't provide a simple way of commanding at this level.
这篇关于C# - 删除文件永久的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!