Skip to content

ndi.cloud.sync.internal.downloadNdiDocuments

  DOWNLOADNDIDOCUMENTS Downloads a collection of NDI documents and their files.

    ndi.cloud.sync.internal.DOWNLOADEDNDIDOCUMENTS = ndi.cloud.sync.internal.DOWNLOADNDIDOCUMENTS(...
        CLOUDDATASETID, CLOUDDOCUMENTIDS, NDIDATASET, SYNCOPTIONS)

    This function downloads document metadata from the cloud, and if
    syncOptions.SyncFiles is true, it also downloads the associated data files
    to a local staging location and updates document file information.
    Finally, it adds the documents to the local NDI dataset if provided

    Inputs:
        cloudDatasetId (1,1) string - The ID of the dataset on the cloud.
        cloudDocumentIds (cellstr or string array) - A list of
            cloud-specific document IDs to download.
        ndiDataset (1,1) ndi.dataset - Optional: The local NDI dataset object.
        syncOptions (1,1) ndi.cloud.sync.SyncOptions - Synchronization options.

    Outputs:
        downloadedNdiDocuments (cell): A cell array of the ndi.document objects
            that were downloaded and added to the dataset.

    See also: ndi.cloud.download.download_document_collection,
              ndi.cloud.sync.internal.getFileUidsFromDocuments,
              ndi.cloud.download.download_dataset_files,
              ndi.cloud.sync.internal.updateFileInfoForRemoteFiles,
              ndi.cloud.sync.internal.updateFileInfoForLocalFiles