boolean moveFile(File file,File targetDirectory,String newEntryName,String extensionSuffix) throws RepositoryException {
  String name;
  String suffix;
  if (newEntryName == null) {
    Pair<String,String> nameAndSuffix=extractNameAndSuffix(file);
    name=nameAndSuffix.getFirst();
    suffix=nameAndSuffix.getSecond();
  }
 else {
    name=newEntryName;
    suffix=extensionSuffix.contains(".") ? extensionSuffix.substring(1) : null;
  }
  return renameFile(file,name,suffix,targetDirectory);
}

boolean moveFile ( File file , File targetDirectory , String newEntryName , String extensionSuffix ) throws RepositoryException { String name ; String suffix ; if ( newEntryName == null ) { Pair < String , String > nameAndSuffix = extractNameAndSuffix ( file ) ; name = nameAndSuffix . getFirst ( ) ; suffix = nameAndSuffix . getSecond ( ) ; } else { name = newEntryName ; suffix = extensionSuffix . contains ( "." ) ? extensionSuffix . substring ( 1 ) : null ; } return renameFile ( file , name , suffix , targetDirectory ) ; }
moves the file to a new location .
