Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Google Drive File ID Unique globally?

Is Google Drive File ID is unique across globe. Is there chance that UUID generated using NSUUID class will be same as Google drive File ID?
FYI:This is not duplicate of 'Are google docs/drive resource_id's globally unique'

like image 814
Raviprakash Avatar asked Oct 30 '13 15:10

Raviprakash


People also ask

What is the ID of Google Drive file?

Google Drive File ID is a unique identifier of the file on Google Drive. File IDs are stable throughout the lifespan of the file, even if the file name changes. To locate the File ID, right-click on the name of the file, choose the Get Shareable Link option, and turn on Link Sharing if needed.

Does Google Drive have metadata?

Labels are metadata you define to help users organize, find, and apply policy to items in Drive, Docs, Sheets, and Slides. Drive labels are useful for many common workplace scenarios for organizing files, including: record management, classification, structured finding, workflow, reporting, auditing, and more.

What is unique about Google Drive?

Google Drive is a cloud-based storage solution that allows you to save files online and access them anywhere from any smartphone, tablet, or computer. You can use Drive on your computer or mobile device to securely upload files and edit them online. Drive also makes it easy for others to edit and collaborate on files.

Are my Google Drive files public?

Your files are private unless you choose to share them. You can share files with: One person or a few people using a link.

Are Google Drive files stored locally?

With Google Drive for desktop, this is no problem. Your files are stored exclusively online unless you make them available for offline access.


2 Answers

The way we generate IDs are quite different than UUID generation and the canonical form of Drive generated IDs differ from v1/2/3/4/5 UUIDs. It's not possible you will see a collision.

like image 112
Burcu Dogan Avatar answered Sep 28 '22 05:09

Burcu Dogan


I would bet a great deal of money that Google does not check to ensure that its UUIDs are unique. And NSUUID most certainly doesn't check against all Google UUIDs.

However, the chances of a collision are absurdly small. If you generate 100k UUIDs, the chances of any two being the same are less than winning the Powerball jackpot 4 drawings in a row. If Google generates 10,000 UUIDs for every man, woman, and child alive, the chances of a collision are about the same as winning 3 drawings in a row. If everyone alive today got a UUID for everyone else alive today, the odds of a collision are about the odds of winning 2.285 drawings in a row (yeah, yeah, fractions of a discrete event, deal with it).

In short, you're more likely to have Dennis Ritchie come back from the dead and slap you silly for caring about UUID collisions than to actually see a collision. Don't worry about them.

like image 20
Kevin Avatar answered Sep 28 '22 06:09

Kevin