/// <summary> /// Combines multiple strings into a path. /// </summary> /// <param name="paths">Path elements to combine.</param> /// <returns>A combined path.</returns> public static string Combine(params string[] paths) { #if DESKTOP || MAC || ANDROID || __IOS__ return(System.IO.Path.Combine(paths)); #endif throw ExceptionsHelper.NotImplementedInReferenceAssembly(); }
/// <summary> /// Returns the filename for the specified path string. /// </summary> /// <param name="path">The path string from which to obtain the file name and extension.</param> /// <returns> /// <para> /// A <see cref="string" /> consisting of the characters after the last /// directory character in path. /// </para> /// <para> /// If the last character of <paramref name="path" /> is a directory or /// volume separator character, an empty <see cref="string" /> is returned. /// </para> /// </returns> /// <exception cref="System.ArgumentException"><paramref name="path" /> contains one or more invalid characters.</exception> public static string GetFileName(string path) { #if DESKTOP || MAC || ANDROID || __IOS__ return(System.IO.Path.GetFileName(path)); #endif throw ExceptionsHelper.NotImplementedInReferenceAssembly(); }
/// <summary> /// Determines whether a path string includes an extension. /// </summary> /// <param name="path">The path to search for an extension.</param> /// <returns> /// <see langword="true" />. if the characters that follow the last /// directory separator or volume separator in the <paramref name="path" /> /// include a period (.) followed by one or more characters; /// otherwise, <see langword="false" />. /// </returns> /// <exception cref="System.ArgumentException"><paramref name="path" /> contains one or more invalid characters.</exception> public static bool HasExtension(string path) { #if DESKTOP || MAC || ANDROID || __IOS__ return(System.IO.Path.HasExtension(path)); #endif throw ExceptionsHelper.NotImplementedInReferenceAssembly(); }