ListDrives Method
List drives available to the user.
Syntax
onedrive.listDrives([callback])
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for this method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This method lists drives available to the user. In many cases this will only be the user's default drive.
After calling this method DriveCount will be populated with the number of drives available. DriveIndex may be set to any value from 0 to DriveCount to select a drive. By default the DriveIndex is automatically set to 0 to select the first drive returned. After calling this method the following properties may be queried to obtain information about the drive:
- DriveId
- DriveType
- DriveOwnerId
- DriveOwnerName
- DriveDeletedSpace
- DriveRemainingSpace
- DriveState
- DriveTotalSpace
- DriveUsedSpace