diff --git a/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs b/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs index 80d434265a..e4a8701b6e 100644 --- a/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs +++ b/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs @@ -239,7 +239,7 @@ namespace System.Management.Automation internal static bool NonWindowsIsSymLink(FileSystemInfo fileInfo) { - return Unix.IsSymLink(fileInfo); + return Unix.NativeMethods.IsSymLink(fileInfo.FullName); } internal static string NonWindowsInternalGetTarget(SafeFileHandle handle) @@ -250,12 +250,12 @@ namespace System.Management.Automation internal static string NonWindowsInternalGetTarget(string path) { - return Unix.FollowSymLink(path); + return Unix.NativeMethods.FollowSymLink(path); } internal static string NonWindowsGetUserFromPid(int path) { - return Unix.GetUserFromPid(path); + return Unix.NativeMethods.GetUserFromPid(path); } #if CORECLR @@ -344,7 +344,7 @@ namespace System.Management.Automation internal static bool NonWindowsIsExecutable(string path) { - return Unix.IsExecutable(path); + return Unix.NativeMethods.IsExecutable(path); } internal static uint NonWindowsGetThreadId() @@ -516,16 +516,6 @@ namespace System.Management.Automation } - public static bool IsSymLink(FileSystemInfo fs) - { - return NativeMethods.IsSymLink(fs.FullName); - } - - public static bool IsExecutable(string filePath) - { - return NativeMethods.IsExecutable(filePath); - } - public static void SetDate(SetDateInfoInternal info) { int ret = NativeMethods.SetDate(info); @@ -542,16 +532,6 @@ namespace System.Management.Automation return ret == 1 ? true : false; } - public static string FollowSymLink(string path) - { - return NativeMethods.FollowSymLink(path); - } - - public static string GetUserFromPid(int pid) - { - return NativeMethods.GetUserFromPid(pid); - } - [StructLayout(LayoutKind.Sequential)] internal class SetDateInfoInternal {