It may possibly be achieved by using getEntryWithUrl to generate an Entry from a path string.
This example gives a good explanation.