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
Post a Comment