Bug 31235 - [Binding] NSHomeDirectory and friends
Summary: [Binding] NSHomeDirectory and friends
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) (show other bugs)
Version: 2.0.0
Hardware: PC Mac OS
: Normal enhancement
Target Milestone: master
Assignee: Bugzilla
Depends on:
Reported: 2015-06-18 17:38 UTC by Chris Hamons
Modified: 2017-03-15 19:31 UTC (History)
4 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Comment 1 Miguel de Icaza [MSFT] 2016-09-20 17:39:50 UTC
Do we really need these APIs?   There are various NSFileManager_NSUserInformation methods that surface these capabilities already.
Comment 2 Chris Hamons 2016-09-20 17:41:44 UTC
The user request for the API in question - 

Comment 3 Chris Hamons 2016-09-20 17:43:22 UTC
@Miguel - The API in question

	[BaseType (typeof (NSFileManager))]
	interface NSFileManager_NSUserInformation {

		[NoWatch][NoTV][NoiOS][Mac (10, 12)]
		[Export ("homeDirectoryForCurrentUser")]
		NSUrl GetHomeDirectoryForCurrentUser ();

is 10.12 only. It didn't exist when this was filed FWICT.
Comment 4 Sjoerd van Noort 2016-09-21 12:37:45 UTC
Besides the new fucntion being only available for 10.12 I am not sure it returns the same path for sanboxed apps. homeDirectoryForCurrentUser alsways returns the user homedirectory (according to apple docs).

But NSHomeDirecty according to docs:
n macOS, it is the application’s sandbox directory or the current user’s home directory (if the application is not in a sandbox)
Comment 5 Chris Hamons 2016-09-21 14:26:24 UTC

Note You need to log in before you can comment on or make changes to this bug.