Does anyone know how to get the path to the tmp
directory in iOS 8 with Xamarin?
Access tmp directory in iOS 8 with Xamarin.iOS
Just try:
var documents = NSFileManager.DefaultManager
.GetUrls(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomain.User)[0].Path;
var tmp = Path.Combine(documents, "../", "tmp");
Interesting. He makes this path
/Documents/../tmp/test.jpg
. Through ..
he is in the correct path. –
Nacreous Was wondering about that strange path lately, too. For a detailed overview see developer.xamarin.com/guides/ios/application_fundamentals/… –
Mouthy
You can just use
var tmp = System.IO.Path.GetTempPath ();
This will return your app's tmp directory
//https://developer.xamarin.com/guides/ios/application_fundamentals/working_with_the_file_system
public string TempPath()
{
var documents = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
var ret = Path.Combine(documents, "..", "tmp");
return ret;
}
© 2022 - 2024 — McMap. All rights reserved.
tmp
directory or a subdirectory of theDocuments
directory (which can be made available to the user through iTunes file sharing and will be backed up)? – Nacreous