Matterway
    Preparing search index...

    Function getFileByPathEval

    • Get a file by its path from a SharePoint drive using Microsoft Graph API.

      Parameters

      • ctx: Context
      • token: string

        Access token from getSharePointTokenUserAuth

      • options: { driveId: string; filePath: string }
        • driveId: string

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

        • filePath: string

          File path (e.g. , '/path/to/file.txt')

      Returns Promise<ArrayBuffer>

      Return file content as ArrayBuffer

      const fileContent = await getFileByPathEval(ctx, token, {
      driveId: 'ab!5xqiQKeGnEGeI02fc4Mu5HrH_BkaM1FNnCohEqq7eEnQYz1prATORbPSv-3951Ny',
      filePath: '/path/to/file.txt',
      });