IPWorks Cloud 2020 .NET Edition

Questions / Feedback?

ListRevisions Method

Lists revisions for a file path or file resource Id.

Syntax

public void ListRevisions(string fileResource);
Public Sub ListRevisions(ByVal FileResource As String)

Remarks

This method lists revisions for a specific file path or for a specific file resource Id. This method is not supported for folder resources.

FileResource must be a file path, an Id-based relative file path, or a file resource Id.

Calling this method will fire the ResourceList event once for each resource, and will also populate the Resources collection.

The MaxRevisionResults configuration setting controls the maximum number of results returned. (Note that unlike the component's other listing methods, the results returned by this method are never paged; MaxRevisionResults specifies the overall limit rather than the page size limit.)

Path-based vs. Id-based Revision Histories

When listing revisions, the server can return the revision history either by path or by Id. A path's revision history will include revisions for any and all files that have been located there; while an Id's revision history will only return revisions for the associated file resource (regardless of where it's been located over time).

By default, the component chooses which mode the server should use automatically each time ListRevisions is called based on the kind of resource identifier passed for the FileResource parameter. If a path (or an Id-based relative path) is provided, it chooses the path-based mode; and if a file resource Id is provided, it chooses the Id-based mode.

The ListRevisionsMode configuration setting can be used to explicitly control which revision listing mode the server should use.

// ResourceList event handler.
dropbox.OnResourceList += (s, e) => {
  Console.WriteLine(e.Name + ", Revision: " + e.Revision);
};

dropbox.ListRevisions("/work_stuff/serious_business/best_cat_pictures.zip");

for (int i = 0; i < dropbox.Resources.Count; i++) {
  // Process resource revisions here.
}

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 .NET Edition - Version 20.0 [Build 8265]