Files
jellyfin-jellyfin-1/src/Jellyfin.Extensions/FileHelper.cs

21 lines
515 B
C#
Raw Normal View History

2025-05-04 16:40:34 +02:00
using System.IO;
namespace Jellyfin.Extensions;
/// <summary>
/// Provides helper functions for <see cref="File" />.
/// </summary>
public static class FileHelper
{
/// <summary>
/// Creates, or truncates a file in the specified path.
/// </summary>
/// <param name="path">The path and name of the file to create.</param>
public static void CreateEmpty(string path)
{
using (File.OpenHandle(path, FileMode.Create, FileAccess.ReadWrite, FileShare.None))
{
}
}
}