How lock files with Google drive API V3 in VB.NET

Actarus 1 Reputation point
2022-03-31T13:05:29.943+00:00

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

This is my routine
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

Can someone Help me ?

Developer technologies VB
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.