Thanks for your suggestion.But the SD socket I use does not have a Pin to detect that the card is present.How ever, I think such a pin/switch is optional so shouldn't the Library be able to detect the availability of the SD itself?

But even if you think that it is unnecessary, how can I now detect that the card is present?I am not familiar with SPI, but my idea would be to send a "test"-signal to the SD. Googling for Arduino+SD+SPI+returned many results but until now I did not find a sample.Any Ideas?

Thanks for the answer.My CardSocket does not have this Card Detect because I had to make it myself using a mSD-to-SD adapter.But I guess this is my problem, not a general one.How ever, the original reason to post this Thread was the behavior of exists() ( and begin() in some way )

Let's assume I have a socket with the CardDetect pin, I pull the card out and insert it/another one again. I still need a way to detect if a File exists after that, and that is not possible if exists() reads the available files from a buffer.And calling begin() again seems to fail. It returns FALSE because it thinks it is already initialized I guess (it would return TRUE if initialisation was successful). But there is no end() or something to destroy the object.

That's still something that is better handled by your application. If needed you could attach an interrupt to the CD pin and handle it that way. But as was mentioned, if the card is pulled while an action is in process you may still have problems.

I will try to find the author. But there is no email or name written in the wrapper's files. Only the copyright points to SparkFun. Maybe I have luck on IRC.

I got a new SD socket now with the CardDetect switch/pin (finally it was in stock again). Still the wrapper is unusable if you want to remove the card from the socket because you can not de-initialize the SD object to initialize it again later.

The reason you cannot call begin repeatedly is the the root file object is still open. If you add a root.close() to the begin routine in SD.cpp then you can use begin repeatedly and verify the presence of a card.