Class Rename


public final class Rename extends ACreate
Evaluates the 'rename' command and renames resources or directories in a collection.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • Rename

      public Rename(String source, String target)
      Default constructor.
      Parameters:
      source - source path
      target - target path
  • Method Details

    • run

      protected boolean run()
      Description copied from class: Command
      Executes the command and serializes the result (internal call).
      Specified by:
      run in class Command
      Returns:
      success of operation
    • target

      public static String target(Data data, int pre, String src, String trg)
      Generates a target path for the specified document.
      Parameters:
      data - data reference
      pre - pre value of the document
      src - source path
      trg - target path
      Returns:
      new name