Use the getTotalSize
method to retrieve the total size of a specific drive.
try {
const driveId = 'drive_id_here'; // The ID of the drive to get the size of.
const driveSize = await sdk.drive.getTotalSize(driveId);
console.log('Drive Size:', driveSize);
} catch (error) {
console.error(error.message);
}
Params
id
(string): The ID of the drive to get the size of.
Required API Key Permission
Read Directory