Trying to read files outside of your home dir will raise the following exception:
java.security.AccessControlException: access denied (java.io.FilePermission ... read)The path of the "user.dir" on Google App Engine/J follows the following structure:
/base/data/home/apps/[app-id]/[version-id]The version-id appears to be a version identifier followed by a dot (".") and then an 18 digit random number.
A new home directory is created each time you deploy your app using "appcfg.sh update".
Combining the fact that you're allowed to read your own home dir with the fact that a new deployment gives rise to a new home dir gives you the following method to get the exact date and time of your last deployment:
Date deployTime = new Date(new File((String) System.getProperties().get("user.dir")).lastModified());
1 comments:
Hello,
Is that mean that the only solution to save textual data is the JDO Or JPA of google app engine??
Post a Comment