I have the following file
/app/menus/menu1.yml
and I\'d like to read it\'s contents
--
short answer:
fileConten
PlayFramework is built using the Java language.
In your code, there is no restriction about the usage of the java API. So, your file can be read using the standard java code, if you know the file absolute path:
java.io.File yourFile = new java.io.File("/path/app/menus/menu1.yml");
java.io.FileReader fr = new java.io.FileReader(yourFile);
// etc.
If you want to access a File in a relative path from your Play application, your can use the play "VirtualFile" class: http://www.playframework.org/documentation/api/1.1/play/vfs/VirtualFile.html
VirtualFile vf = VirtualFile.fromRelativePath("/app/menus/menu1.yml");
File realFile = vf.getRealFile();
FileReader fr = new FileReader(realFile);
// etc.