Matterway
    Preparing search index...

    Function copyFileEval

    • Copy a file to a SharePoint drive using Microsoft Graph API.

      Parameters

      • ctx: Context
      • token: string

        Access token from getSharePointTokenUserAuth

      • options: { driveId: string; parentId: string; fileId: string; newFileName: string }
        • driveId: string

          Destination drive ID (e.g. , 'ab!5xqiQKeGnEGeI02fc4Mu5HrH_BkaM1FNnCohEqq7eEnQYz1prATORbPSv-3951Ny')

        • parentId: string

          Destination parent folder ID (e.g. , '01NKDM7HMOJTVYMDOSXFDK2QJDXCDI3WUK')

        • fileId: string

          File ID (e.g. , '01NKDM7HMOJTVYMDOSXFDK2QJDXCDI3WUK')

        • newFileName: string

          New copy file name (e.g. , '/new-name.txt')

      Returns Promise<boolean>

      Return true if copied successfully

      const copyResponse = await copyFileEval(ctx, token, {
      driveId: 'ab!5xqiQKeGnEGeI02fc4Mu5HrH_BkaM1FNnCohEqq7eEnQYz1prATORbPSv-3951Ny',
      fileId: 'ahsiaoproductivemobile.sharepoint.com,40a21ae7-86a7-419c-9e23-4d9f73832ee4,19fcc77a331a-4d51-9c2a-2112aabb7849',
      destinationPath: '/path/to/destination.txt',
      });