list_resources Method
Lists resources in the currently selected folder.
Syntax
def list_resources() -> None: ...
Remarks
This method lists resources in the folder resource currently selected by remote_id or remote_path.
Calling this method will fire the on_resource_list event once for each resource, and will also populate the Resource* properties.
If there are still more resources available to list when this method returns, the resource_marker property will be populated. Continue to call this method until resource_marker is empty to accumulate all pages of results in the Resource* properties.
For more complex queries, use the search method.
// ResourceList event handler. onedrive.OnResourceList += (s, e) => { Console.WriteLine(e.Name); }; // (Assume that the RemoteId property isn't set; it takes precedence if it is.) onedrive.RemotePath = "/work_files/serious_business/cats"; do { onedrive.ListResources(); for (int i = 0; i < onedrive.Resources.Count; i++) { // Process resources here. } } while (!string.IsNullOrEmpty(onedrive.ResourceMarker));