Method to get the content of a file.