Is there an API or a way to check if a drive is "disconnected network drive"?

Thanks