Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access tmp directory in iOS 8 with Xamarin.iOS

Does anyone know how to get the path to the tmp directory in iOS 8 with Xamarin?

like image 695
testing Avatar asked Apr 30 '15 12:04

testing


2 Answers

Just try:

var documents = NSFileManager.DefaultManager
    .GetUrls(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomain.User)[0].Path;

var tmp = Path.Combine(documents, "../", "tmp");
like image 163
asp_net Avatar answered Sep 28 '22 15:09

asp_net


You can just use

var tmp = System.IO.Path.GetTempPath ();

This will return your app's tmp directory

like image 20
dalexsoto Avatar answered Sep 28 '22 14:09

dalexsoto