ListPermissions Method
Lists the permissions for a file, folder, or shared drive.
Object Oriented Interface
public function doListPermissions($resourceid);
Procedural Interface
ipworkscloud_googledrive_do_listpermissions($res, $resourceid);
Remarks
This method is used to list permissions for the file, folder, or shared drive specified by ResourceId.
Calling this method will fire the PermissionList event once for each permission, and will also populate the Permission* properties.
If there are still more permissions available to list when this method returns, the PermissionMarker property will be populated. Continue to call this method until PermissionMarker is empty to accumulate all pages of results in the Permission* properties.
// PermissionList event handler. googledrive.OnPermissionList += (s, e) => { Console.WriteLine("Permission Id: " + e.Id); }; // List all of the permissions on the given resource. do { googledrive.ListPermissions("fdjhskdf89o3wi"); for (int i = 0; i < googledrive.Permissions.Count; i++) { // Process permissions here. } } while (!string.IsNullOrEmpty(googledrive.PermissionMarker));
Shared Drive Members
Refer to UpdatePermissions for more information about how permissions work in general, how permissions relate to shared drive members, and how to manipulate multiple members at once.