示例#1
0
 @Override
 public Resource rename(String name) {
   GridFSDBFile gridFSDBFile = getGridFSDBFile(getPath(), true);
   JailedResourcePath renamed = getPath().unjail().getParent().get(name);
   gridFSDBFile.put("filename", getFilename(renamed));
   gridFSDBFile.save();
   return getRenamedResource(renamed);
 }
示例#2
0
 @Override
 public void touch() {
   GridFSDBFile gridFSDBFile = getGridFSDBFile(getPath(), true);
   gridFSDBFile.put("uploadDate", new Date());
   gridFSDBFile.save();
 }