< Summary - Jellyfin

Information
Class: Jellyfin.Extensions.FileHelper
Assembly: Jellyfin.Extensions
File(s): /srv/git/jellyfin/src/Jellyfin.Extensions/FileHelper.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 20
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
CreateEmpty(...)100%11100%

File(s)

/srv/git/jellyfin/src/Jellyfin.Extensions/FileHelper.cs

#LineLine coverage
 1using System.IO;
 2
 3namespace Jellyfin.Extensions;
 4
 5/// <summary>
 6/// Provides helper functions for <see cref="File" />.
 7/// </summary>
 8public static class FileHelper
 9{
 10    /// <summary>
 11    /// Creates, or truncates a file in the specified path.
 12    /// </summary>
 13    /// <param name="path">The path and name of the file to create.</param>
 14    public static void CreateEmpty(string path)
 15    {
 5116        using (File.OpenHandle(path, FileMode.Create, FileAccess.ReadWrite, FileShare.None))
 17        {
 5118        }
 5119    }
 20}

Methods/Properties

CreateEmpty(System.String)