Checking to see if SD card was ejected

I've been playing around with the SD library and am having problems with finding out if the SD card was ejected. Is there any test to see if the card is still there after it has been opened and written already.

I am using "dataFile = SD.open("Vdata.csv", FILE_WRITE);" to open the file on the SD card which works fine. If the card is not there I get dataFile =false. Later I want to be sure it wasn't ejected; how do I test to see if it was?

Thanks for your help!!!

how do I test to see if it was?

The SD card reader might have the card detect pin wired up to an Arduino pin, that you could read, or you might need to wire it up.