* rename a directory to a new Name
* @throws PageException
*/
public static void actionRename(PageContext pc,Resource directory,String strNewdirectory,String serverPassword, boolean createPath, Object acl,int storage) throws PageException {
// check directory
SecurityManager securityManager = pc.getConfig().getSecurityManager();
securityManager.checkFileLocation(pc.getConfig(),directory,serverPassword);
if(!directory.exists())
throw new ApplicationException("the directory ["+directory.toString()+"] doesn't exist");
if(!directory.isDirectory())
throw new ApplicationException("the file ["+directory.toString()+"] exists, but it isn't a directory");
if(!directory.canRead())
throw new ApplicationException("no access to read directory ["+directory.toString()+"]");
if(strNewdirectory==null)
throw new ApplicationException("the attribute [newDirectory] is not defined");
// real to source
Resource newdirectory=toDestination(pc,strNewdirectory,directory);
securityManager.checkFileLocation(pc.getConfig(),newdirectory,serverPassword);
if(newdirectory.exists())
throw new ApplicationException("new directory ["+newdirectory.toString()+"] already exists");
if(createPath) {
newdirectory.getParentResource().mkdirs();