c# - The given path's format is not supported in Isolated storage -



c# - The given path's format is not supported in Isolated storage -

i want calculate file size before uploading in server, before maintain file in isolated storage creating folder. want path calculating file size, giving error "the given path's format not supported"

my code is:

class="lang-c# prettyprint-override">string filepath = path.combine(foldername, filename); string fp = @"ms-appdata:///local//" + imagefolder + "//" + fname; // here tried "/" , seek append "filepath " straight still throwing same error fileinfo info = new fileinfo(fp); ////here throwing error "the given path's format not supported" var filelength = new system.io.fileinfo(fp).length; int image_file_size = convert.toint32(filelength);

what right format path?

think kind of path when you're sourcing code in xaml. if want system.io

then need build path this

string dbpath = path.combine(windows.storage.applicationdata.current.localfolder.path, "db.sqlite"); fileinfo info = new fileinfo(dbpath);

c# windows-phone-8

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -