Story ID: Young man trapped on an island in Ireland? Scotland? [Spoiler]

This is a classic story, but the title is not coming to my mind. I have it in my head that it took place in the 18th or 19th Century. A young man is stranded on an island. He can see the mainland a short distance away, but he can’t swim. Fishermen pass by in their boats and he tries to get their attention. They just wave back.

At the end, it turns out the water separating him from the mainland is so shallow he could have easily walked to the other side.

Kidnapped, by Robert Louis Stevenson.

I thought that what it was, but I skimmed the plot on Wikipedia and didn’t see it.

See Sparknotes:

On the way, however, the ship strikes the Torran Rocks and goes down. David escapes and finds himself on an island. The island is separated from a larger main island only by a river, but he can find no way to cross the river. After a few days, a fisherman comes in a boat and reveals to him that the river gets very low at high tide, and David crosses easily.

https://www.sparknotes.com/lit/kidnapped/summary/

Further info:

Thank you, Northern_Piper.