Results 1 to 2 of 2

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

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2022
    Posts
    6

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

    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/...s/file-locking

    and 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 ?

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,945

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

    @acturus999:
    While this doens't answer your question, here are a few tips:
    1. Use code tags (the "#" button above the message you're about to post) to enclose your code.
    2. Another way to write "If FileID <> "" Then" would be "If Not FileID = Nothing Then".

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width