diff options
| author | Bond-009 <bond.009@outlook.com> | 2025-05-04 16:40:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-04 08:40:34 -0600 |
| commit | 0c3ba30de214eddcd6118c3b695b08e5482bf7ed (patch) | |
| tree | a862a90f6c78cd61f78e5af7b75611a37f527ccf /src/Jellyfin.Extensions | |
| parent | 4096c973c623a72525843d5fe278d1f36fbbc58a (diff) | |
Cleanup file related code (#14023)
Diffstat (limited to 'src/Jellyfin.Extensions')
| -rw-r--r-- | src/Jellyfin.Extensions/FileHelper.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Jellyfin.Extensions/FileHelper.cs b/src/Jellyfin.Extensions/FileHelper.cs new file mode 100644 index 000000000..b1ccf8d47 --- /dev/null +++ b/src/Jellyfin.Extensions/FileHelper.cs @@ -0,0 +1,20 @@ +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)) + { + } + } +} |
