Click here to Skip to main content
15,905,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi to all, can someone share an example to how lock/unlock/check if a file is locked inside Google Drive ?

I saw the example in Python but I'm not able to create a correct routine to do it in VB.net

That's the examples in Python: https://developers.google.com/drive/api/guides/file-locking


Can someone Help me ?

What I have tried:

This is my routine
VB
If FileID <> "" Then
    Dim file As Google.Apis.Drive.v3.Data.File = Service.Files.Get(FileID).Execute
    Dim metadata = New Google.Apis.Drive.v3.Data.File()
    metadata.Description = "Test01"
    metadata.ContentRestrictions = ' I want to set to read only
    Service.Files.Update(metadata, FileID).Execute()
End If
Posted
Updated 31-Mar-22 3:15am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900