public async Task <string> DownloadModelToLocalStorageAsync()
    {
        var worked       = false;
        var mainFilePath = string.Empty;

#if ENABLE_WINMD_SUPPORT
        // Grab the list of Uris/Files that make up the remote model. Note that there
        // is an assumption that the first file here will be the actual GLB/GLTF file
        // otherwise the code below which sets mainFilePath will not work.
        var remoteUrisForModel = await DownloadRemoteUriListForModelAsync();

        if (remoteUrisForModel.Count > 0)
        {
            worked = true;

            // Add into that the URI for the anchor file so that we download this too
            var remoteAnchorFileUri = FileStorageManager.GetAnchorFileRelativeUri(
                this.modelIdentifier);

            remoteUrisForModel.Add(remoteAnchorFileUri);

            // Iterate through and download each one of those files if we need to.
            for (int i = 0; ((i < remoteUrisForModel.Count) && worked); i++)
            {
                // Recurse down & make sure we have a file in the right folder to store
                // this locally.
                var localFile = await FileStorageManager.GetStorageFileForRelativeUriAsync(
                    remoteUrisForModel[i]);

                // Store off the first local file path as we assume that will be the .GLB or
                // GLTF file.
                if (i == 0)
                {
                    mainFilePath = localFile.Path;
                }

                // We want the size of that file.
                var properties = await localFile.GetBasicPropertiesAsync();

                // If the file was already there with > 0 size then we will not overwrite it.
                // (as a cheap form of caching)
                if (properties.Size == 0)
                {
                    // Go grab the file from the remote HoloLens web server and store
                    // the bits locally.
                    worked = await DownloadToStorageFileAsync(remoteUrisForModel[i], localFile);
                }
            }
        }
#endif // ENABLE_WINMD_SUPPORT

        return(worked ? mainFilePath : string.Empty);
    }
    async Task <List <string> > DownloadRemoteUriListForModelAsync()
    {
        // We first download the file list which tells us which files make up the model.
        var fileListUri = FileStorageManager.GetFileListRelativeUri(this.modelIdentifier);

        // Get a local storage file within the 3D objects folder to store that into.
        var fileListLocalFile = await FileStorageManager.GetStorageFileForRelativeUriAsync(
            fileListUri);

        // Download the remote file list.
        await DownloadToStorageFileAsync(fileListUri, fileListLocalFile);

        // Read the bill of materials - the files that make up the model.
        var remoteFileUris = await FileIO.ReadLinesAsync(fileListLocalFile);

        return(remoteFileUris.ToList());
    }