The idea of someone escaping from prison by using a file that has been baked into a cake is a common joke.
Jokes quite often have basis in fact, so where did this one come from?
The story originates from a plot aboard a prison ship, which was recorded in 1804.
Several thieves aboard the ship, which was transporting prisoners from England to America, had managed to get hold of files and saws, which they intended to hide inside gingerbread cakes. They planned to use them to break their chains and escape.
Their plan was foiled by another convicted felon by the name of William Blewitt, who alerted the wardens to their plan!
As a reward for doing the honourable thing and dropping his friends in it, Blewitt was pardoned! So while there are no recorded instances of a file in a cake ever getting someone out of prison directly, Blewitt could have claimed to have indirectly used one to achieve his freedom!
What did he do with this new found freedom? He immediately got caught for another crime and was incarcerated again!