Get File (Download)

Downloads a file from OneDrive or SharePoint.

If DestinationPath is given, the file is written to disk and Office365GetFileResult stays empty. If it is left empty, the content is returned as PAWFileData.


⬅️INPUT

Parameter

Type

Required

Description

ConnectionSettings

PAWOffice365ConnectionSettings

✅Yes

OneDrive or SharePoint connection settings

FilePath

String

✅Yes

Source file path

DestinationPath

String

❌No

Local destination file path (in-memory output if empty)

Overwrite

Boolean

❌No

Overwrite if the local file exists (default: no)


➡️OUTPUT

Parameter

Type

Description

IsOffice365GetFileSuccessful

Boolean

Operation success status

Office365GetFileMessage

String

Status/error message

Office365GetFileResult

PAWFileData

File name + binary data (if DestinationPath is empty)


⬇️MISC

Parameter

Type

Default

Description

ThrowException

Boolean

❌No

Specifies whether an exception is thrown when the operation fails. The default value is "No".