c# - Substitute for CreateDirectory or Path.Combine in Windows 8 apps -
createdirectory , path.combine doesn't seem work on windows 8 applications. how substitute it?
my first intention create folder inside %appdata%, but
environment.getfolderpath(environment.specialfolder.applicationdata)
(something that, don't quite remember) doesn't work on windows 8 apps. tried documents library using
knownfolders.documentslibrary
but don't know how create folder inside it.
documentslibrary
returns storage folder:
storagefolder documents = knownfolders.documentslibrary;
now storagefolder, or maybe should interface, istoragefolder
has method createfolderasync
2 overloads. simplest one:
storagefolder newfolder = await documents.createfolderasync("mydir");
other overload specifies behavior when there's directory name collision.
Comments
Post a Comment