Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Checking and creating of Folder in Store app c#

$
0
0

Dear all,

Before downloading files from a web service to my local app I need to be sure that folder location exist for that I have try to verify for folder existance in following way :

var appFolder = _storageService.GetFolderAsync(WebSiteProductPhotoPath);
            if (appFolder == null)
            {
               //Create folder
                var s = await ApplicationData.Current.LocalFolder.CreateFolderAsync(WebSiteProductPhotoPath);
                return s.Path;
            }
            return string.Empty;

WebSiteProductPhotoPath ="assets/products/photos"

I need to verify that this all folder structre path exist and if not creating it, but seems to not work like this, doe sit means I need to check for all individual subfolders ?

Thanks for advise

regards


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>