webtau API
    Preparing search index...

    Function rename

    • Renames (moves) a file from one path to another (file-only; directories are not supported and will throw).

      Implemented as a copy-then-remove operation. The source file's contents are copied to the new path and the original is deleted.

      await rename("/app/data/old.json", "/app/data/new.json");
      

      Parameters

      • oldPath: string
      • newPath: string

      Returns Promise<void>