var app = Application.currentApplication() app.includeStandardAdditions = true function readFile(file) { // Convert the file to a string var fileString = file.toString() // Read the file and return its contents return app.read(Path(fileString)) }