From 0c3ba30de214eddcd6118c3b695b08e5482bf7ed Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Sun, 4 May 2025 16:40:34 +0200 Subject: Cleanup file related code (#14023) --- MediaBrowser.Model/IO/AsyncFile.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'MediaBrowser.Model/IO/AsyncFile.cs') diff --git a/MediaBrowser.Model/IO/AsyncFile.cs b/MediaBrowser.Model/IO/AsyncFile.cs index 3c8007d1c..a9db6b81c 100644 --- a/MediaBrowser.Model/IO/AsyncFile.cs +++ b/MediaBrowser.Model/IO/AsyncFile.cs @@ -26,6 +26,14 @@ namespace MediaBrowser.Model.IO Options = FileOptions.Asynchronous }; + /// + /// Creates, or truncates and overwrites, a file in the specified path. + /// + /// The path and name of the file to create. + /// A that provides read/write access to the file specified in path. + public static FileStream Create(string path) + => new FileStream(path, FileMode.Create, FileAccess.ReadWrite, FileShare.None, IODefaults.FileStreamBufferSize, FileOptions.Asynchronous); + /// /// Opens an existing file for reading. /// -- cgit v1.2.3