确定文件位于哪个物理硬盘驱动器上?
如何找到文件/目录所在的物理驱动器。我想比较 2 个文件,如果它们位于两个单独的驱动器上,那么我可以通过同时读取两个文件来加快比较速度。
问候
How can I find the physical drive a file/directory is located on. I want to compare 2 files and if they are on two separate drives, then I can speed up the compare by reading both simultaneously.
Regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这可能需要 P/Invoke。
了解是否存在的方法两个分区位于一个物理硬盘上,没有 WMI?
来自上面的链接:
This may require P/Invoke.
Way to know if two partitions are in one physical hard disk without WMI?
From above link:
无论如何,同时阅读两者。
在最坏的情况下,它可能会稍微慢一些(取决于实际的物理磁盘)。
充其量会更快。
Read both simultaneously regardless.
At worst it might be slightly slower (depends on the actual physical disk(s)).
At best it will be faster.