can u please more specific about NSWorkspace because there is so many methods and functions in this class so i don't understand which one is use for this.
if possible can u please provide me any sample app.
Sounds like you need to start investigating the attributes of the mountedRemovableMedia... start going through the documentation (which someone already provided) and see how you can tell the difference between a mounted .dmg and a mounted external drive.