• Copies a file from one location to another within SharePoint.

    Parameters

    • client: Client

      The client instance used to make API requests.

    • options: {
          destinationDriveId: string;
          destinationFolderId: string;
          driveId: string;
          fileId: string;
          name: string;
      }

      The options for copying the file.

      • destinationDriveId: string

        The ID of the drive containing the destination folder.

      • destinationFolderId: string

        The ID of the destination folder where the file will be copied.

      • driveId: string

        The ID of the drive containing the file to be copied.

      • fileId: string

        The ID of the file to be copied.

      • name: string

        The name of the copied file.

    Returns Promise<void>

    A promise that resolves when the file has been copied.

    const client = await getSharePointClient(opt);
    const options = {
    fileId: 'file-id',
    driveId: 'drive-id',
    destinationFolderId: 'destination-folder-id',
    destinationDriveId: 'destination-drive-id',
    name: 'new-file-name',
    };
    await copyFile(client, options