Bug 31235 - [Binding] NSHomeDirectory and friends
Summary: [Binding] NSHomeDirectory and friends
Status: CONFIRMED
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
URL:
Depends on:
Blocks:
 
Reported: 2015-06-18 17:38 UTC by Chris Hamons
Modified: 2017-03-15 19:31 UTC (History)
4 users (show)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 31235 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

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 - 

https://forums.xamarin.com/discussion/43854/nshomedirectory
Comment 3 Chris Hamons 2016-09-20 17:43:22 UTC
@Miguel - The API in question

	[Category]
	[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
^