org.apache.hadoop.fs.http.server

## Class FSOperations.FSRename

- java.lang.Object
- - org.apache.hadoop.fs.http.server.FSOperations.FSRename

- All Implemented Interfaces:
    FileSystemAccess.FileSystemExecutor<org.json.simple.JSONObject>
  Enclosing class:
    FSOperations

      @InterfaceAudience.Private
      public static class FSOperations.FSRename
      extends Object
      implements FileSystemAccess.FileSystemExecutor<org.json.simple.JSONObject>

  Executor that performs a rename FileSystemAccess files system operation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FSRename(String path, String toPath)` Creates a rename executor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.json.simple.JSONObject` | `execute(org.apache.hadoop.fs.FileSystem fs)` Executes the filesystem operation.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FSRename

          public FSRename(String path,
                          String toPath)

      Creates a rename executor.
      Parameters:
        `path` - path to rename.
        `toPath` - new name.

  - ### Method Detail

    - #### execute

          public org.json.simple.JSONObject execute(org.apache.hadoop.fs.FileSystem fs)
                                             throws IOException

      Executes the filesystem operation.
      Specified by:
        `execute` in interface `FileSystemAccess.FileSystemExecutor<org.json.simple.JSONObject>`
      Parameters:
        `fs` - filesystem instance to use.
      Returns:
        `true` if the rename operation was successful, `false` otherwise.
      Throws:
        `IOException` - thrown if an IO error occurred.

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.