src/packages/EmbedIO.Testing/StockResource.cs
/// <summary>
/// Gets the length of a resource, expressed in bytes.
/// </summary>
/// <param name="path">The path to the resource.</param>
/// <returns>The length of the specified resource.</returns>
/// <exception cref="ArgumentNullException"><paramref name="path"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentException"><paramref name="path"/> is an empty string.</exception>
/// <exception cref="FileNotFoundException"><paramref name="path"/> was not found.</exception>
Gets the length of a resource, expressed in bytes.
Gets the length of a resource expressed in bytes .
public static long GetLength(string path)
        {
            using var stream = Open(path);
            return stream.Length;
        }
public static long GetLength ( string path ) { using var stream = Open ( path ) ; return stream . Length ; }
Gets the length of a resource, expressed in bytes.
Gets the length of a resource expressed in bytes .
The length of the specified resource.
The length of the specified resource .
None
None
was not found.
was not found .
path
string
The path to the resource.
The path to the resource .