How can I detect if there is a floppy in a drive?

前端 未结 7 1786
孤独总比滥情好
孤独总比滥情好 2021-01-18 23:03

I tried to use DriveInfo.IsReady, but it returns false if an unformatted floppy is in the drive.

7条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-18 23:26

    Perhaps you can look at the disk management APIs... That should be able to tell you the capacity of the disk (whether formatted or not)...

    And if there's no capacity, there's no floppy inserted...

提交回复
热议问题