mirror of
https://gitee.com/csharpui/CPF.git
synced 2025-07-17 10:42:00 +08:00
17 lines
604 B
C#
17 lines
604 B
C#
![]() |
using System;
|
||
|
using System.Runtime.InteropServices;
|
||
|
|
||
|
namespace CPF.Mac.Foundation
|
||
|
{
|
||
|
public static class NSSearchPath
|
||
|
{
|
||
|
public static string[] GetDirectories(NSSearchPathDirectory directory, NSSearchPathDomain domainMask, bool expandTilde = true)
|
||
|
{
|
||
|
return NSArray.StringArrayFromHandle(NSSearchPathForDirectoriesInDomains(directory, domainMask, expandTilde));
|
||
|
}
|
||
|
|
||
|
[DllImport("/System/Library/Frameworks/Foundation.framework/Foundation")]
|
||
|
private static extern IntPtr NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directory, NSSearchPathDomain domainMask, bool expandTilde);
|
||
|
}
|
||
|
}
|