public static void actionMove(PageContext pageContext,lucee.runtime.security.SecurityManager securityManager,Resource source,String strDestination,int nameconflict,String serverPassword,Object acl,int mode,String attributes) throws PageException {
  if (nameconflict == NAMECONFLICT_UNDEFINED)   nameconflict=NAMECONFLICT_OVERWRITE;
  if (source == null)   throw new ApplicationException("attribute source is not defined for tag file");
  if (StringUtil.isEmpty(strDestination))   throw new ApplicationException("attribute destination is not defined for tag file");
  Resource destination=toDestination(pageContext,strDestination,source);
  securityManager.checkFileLocation(pageContext.getConfig(),source,serverPassword);
  securityManager.checkFileLocation(pageContext.getConfig(),destination,serverPassword);
  if (source.equals(destination))   return;
  if (!source.exists())   throw new ApplicationException("source file [" + source.toString() + "] doesn't exist");
 else   if (!source.isFile())   throw new ApplicationException("source file [" + source.toString() + "] is not a file");
 else   if (!source.isReadable() || !source.isWriteable())   throw new ApplicationException("no access to source file [" + source.toString() + "]");
  if (destination.isDirectory())   destination=destination.getRealResource(source.getName());
  if (destination.exists()) {
    if (nameconflict == NAMECONFLICT_SKIP)     return;
 else     if (nameconflict == NAMECONFLICT_OVERWRITE)     destination.delete();
 else     if (nameconflict == NAMECONFLICT_MAKEUNIQUE)     destination=makeUnique(destination);
 else     throw new ApplicationException("destiniation file [" + destination.toString() + "] already exist");
  }
  try {
    source.moveTo(destination);
  }
 catch (  Throwable t) {
    t.printStackTrace();
    throw new ApplicationException(t.getMessage());
  }
  setACL(pageContext,destination,acl);
  setMode(destination,mode);
  setAttributes(destination,attributes);
}

public static void actionMove ( PageContext pageContext , lucee . runtime . security . SecurityManager securityManager , Resource source , String strDestination , int nameconflict , String serverPassword , Object acl , int mode , String attributes ) throws PageException { if ( nameconflict == NAMECONFLICT_UNDEFINED ) nameconflict = NAMECONFLICT_OVERWRITE ; if ( source == null ) throw new ApplicationException ( "attribute source is not defined for tag file" ) ; if ( StringUtil . isEmpty ( strDestination ) ) throw new ApplicationException ( "attribute destination is not defined for tag file" ) ; Resource destination = toDestination ( pageContext , strDestination , source ) ; securityManager . checkFileLocation ( pageContext . getConfig ( ) , source , serverPassword ) ; securityManager . checkFileLocation ( pageContext . getConfig ( ) , destination , serverPassword ) ; if ( source . equals ( destination ) ) return ; if ( ! source . exists ( ) ) throw new ApplicationException ( "source file [" + source . toString ( ) + "] doesn't exist" ) ; else if ( ! source . isFile ( ) ) throw new ApplicationException ( "source file [" + source . toString ( ) + "] is not a file" ) ; else if ( ! source . isReadable ( ) || ! source . isWriteable ( ) ) throw new ApplicationException ( "no access to source file [" + source . toString ( ) + "]" ) ; if ( destination . isDirectory ( ) ) destination = destination . getRealResource ( source . getName ( ) ) ; if ( destination . exists ( ) ) { if ( nameconflict == NAMECONFLICT_SKIP ) return ; else if ( nameconflict == NAMECONFLICT_OVERWRITE ) destination . delete ( ) ; else if ( nameconflict == NAMECONFLICT_MAKEUNIQUE ) destination = makeUnique ( destination ) ; else throw new ApplicationException ( "destiniation file [" + destination . toString ( ) + "] already exist" ) ; } try { source . moveTo ( destination ) ; } catch ( Throwable t ) { t . printStackTrace ( ) ; throw new ApplicationException ( t . getMessage ( ) ) ; } setACL ( pageContext , destination , acl ) ; setMode ( destination , mode ) ; setAttributes ( destination , attributes ) ; }
move source file to destination path or file
