Both SharePoint and OneDrive have the same methods, so this can be abstracted down to getting the drive object necessary to interface with the file. This function uses the file path object to determine which drive object should be returned
get_drive(file, ...)
File Path as a sharepoint_file or onedrive_file
Reserved for potential future use
ms_drive object
if (FALSE) {
sp_file <- sharepoint_file('/some/sharepoint/file.txt')
get_drive(sp_file)
}