/// <summary>
/// Returns true if the path ends in a directory separator.
/// </summary>
- internal static bool EndsInDirectorySeparator(string? path) =>
+ internal static bool EndsInDirectorySeparator([NotNullWhen(true)] string? path) =>
!string.IsNullOrEmpty(path) && IsDirectorySeparator(path[path.Length - 1]);
/// <summary>
/// <summary>
/// Returns true if the path ends in a directory separator.
/// </summary>
- public static bool EndsInDirectorySeparator(string path) => PathInternal.EndsInDirectorySeparator(path);
+ public static bool EndsInDirectorySeparator([NotNullWhen(true)] string? path) => PathInternal.EndsInDirectorySeparator(path);
}
}
public static string Combine(string path1, string path2, string path3, string path4) { throw null; }
public static string Combine(params string[] paths) { throw null; }
public static bool EndsInDirectorySeparator(System.ReadOnlySpan<char> path) { throw null; }
- public static bool EndsInDirectorySeparator(string path) { throw null; }
- public static bool Exists([System.Diagnostics.CodeAnalysis.NotNullWhen(true)] string? path) { throw null; }
+ public static bool EndsInDirectorySeparator([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? path) { throw null; }
+ public static bool Exists([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? path) { throw null; }
public static System.ReadOnlySpan<char> GetDirectoryName(System.ReadOnlySpan<char> path) { throw null; }
public static string? GetDirectoryName(string? path) { throw null; }
public static System.ReadOnlySpan<char> GetExtension(System.ReadOnlySpan<char> path) { throw null; }