PathStripToRoot

[DllImport("shlwapi.dll", CharSet = CharSet.Unicode)]
public static extern bool PathStripToRoot(
   [MarshalAs(UnmanagedType.LPWStr)] string pszPath
);

Microsoft documentation: Link

Last updated