Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

How to create new file directory?

$
0
0

I wanna create a file directory, so that I can put the new created file into this new directory.

    var documentsPath = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
    var newDocPath = Path.Combine(documentsPath, documentsPath);
        var filePath = Path.Combine (newDocPath, filename);
        System.IO.File.WriteAllText (filePath, text); // Could not find a part of the path ".../Documents/newDocPath/filename.jpg", 
                                          //I understand newDocPath is not existing yet, but how can I create a new sub dir inside Documents folder?

Thank you


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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