How can I determine if a file exists in a given directory?