c# - How does one create a directory with a PCL -
while dealing creating portable class library out of current code project, workarounds obvious , problematic.
system.io.directory
non-pcl , still need able create directory before creating files inside them.
how create folder in c# without being able call directory.createdirectory(..)
?
there no built-in file , directory i/o support in pcl, since functionality differs platform platform. however, circumvent issue reference pclstorage in portable class library project.
pclstorage provides portable abstraction layer library file , directory i/o reference in portable class library. in platform-specific application implementation, incorporate corresponding implementation library of abstraction layer.
pclstorage applicable .net framework 4 , higher, silverlight 4 , higher, windows phone 7.5 , higher, , windows store apps. relies on async
, await
, means dependent on bcl async package when used e.g. .net 4, silverlight , windows phone 7.5.
you might want have @ mvvmcross file plug-in. mvvmcross portable "by nature" , file plug-in provides relevant file , directory i/o functionality synchronous methods. mvvmcross portable libraries applicable .net framework 4.5, silverlight 4 , higher, windows phone 7.5 , higher, windows store apps, xamarin.ios , xamarin.android.
Comments
Post a Comment