aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/IO
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/IO')
-rw-r--r--MediaBrowser.Model/IO/FileSystemEntryInfo.cs27
-rw-r--r--MediaBrowser.Model/IO/FileSystemMetadata.cs3
-rw-r--r--MediaBrowser.Model/IO/IFileSystem.cs5
-rw-r--r--MediaBrowser.Model/IO/IIsoManager.cs1
-rw-r--r--MediaBrowser.Model/IO/IIsoMount.cs2
-rw-r--r--MediaBrowser.Model/IO/IIsoMounter.cs12
-rw-r--r--MediaBrowser.Model/IO/IODefaults.cs7
-rw-r--r--MediaBrowser.Model/IO/IShortcutHandler.cs1
-rw-r--r--MediaBrowser.Model/IO/IStreamHelper.cs1
-rw-r--r--MediaBrowser.Model/IO/IZipClient.cs3
10 files changed, 41 insertions, 21 deletions
diff --git a/MediaBrowser.Model/IO/FileSystemEntryInfo.cs b/MediaBrowser.Model/IO/FileSystemEntryInfo.cs
index a197f0fbe..36ff5d041 100644
--- a/MediaBrowser.Model/IO/FileSystemEntryInfo.cs
+++ b/MediaBrowser.Model/IO/FileSystemEntryInfo.cs
@@ -1,26 +1,39 @@
namespace MediaBrowser.Model.IO
{
/// <summary>
- /// Class FileSystemEntryInfo
+ /// Class FileSystemEntryInfo.
/// </summary>
public class FileSystemEntryInfo
{
/// <summary>
- /// Gets or sets the name.
+ /// Initializes a new instance of the <see cref="FileSystemEntryInfo" /> class.
+ /// </summary>
+ /// <param name="name">The filename.</param>
+ /// <param name="path">The file path.</param>
+ /// <param name="type">The file type.</param>
+ public FileSystemEntryInfo(string name, string path, FileSystemEntryType type)
+ {
+ Name = name;
+ Path = path;
+ Type = type;
+ }
+
+ /// <summary>
+ /// Gets the name.
/// </summary>
/// <value>The name.</value>
- public string Name { get; set; }
+ public string Name { get; }
/// <summary>
- /// Gets or sets the path.
+ /// Gets the path.
/// </summary>
/// <value>The path.</value>
- public string Path { get; set; }
+ public string Path { get; }
/// <summary>
- /// Gets or sets the type.
+ /// Gets the type.
/// </summary>
/// <value>The type.</value>
- public FileSystemEntryType Type { get; set; }
+ public FileSystemEntryType Type { get; }
}
}
diff --git a/MediaBrowser.Model/IO/FileSystemMetadata.cs b/MediaBrowser.Model/IO/FileSystemMetadata.cs
index 4b9102392..118c78e80 100644
--- a/MediaBrowser.Model/IO/FileSystemMetadata.cs
+++ b/MediaBrowser.Model/IO/FileSystemMetadata.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -55,7 +56,7 @@ namespace MediaBrowser.Model.IO
public DateTime CreationTimeUtc { get; set; }
/// <summary>
- /// Gets a value indicating whether this instance is directory.
+ /// Gets or sets a value indicating whether this instance is directory.
/// </summary>
/// <value><c>true</c> if this instance is directory; otherwise, <c>false</c>.</value>
public bool IsDirectory { get; set; }
diff --git a/MediaBrowser.Model/IO/IFileSystem.cs b/MediaBrowser.Model/IO/IFileSystem.cs
index 53f23a8e0..dc6549787 100644
--- a/MediaBrowser.Model/IO/IFileSystem.cs
+++ b/MediaBrowser.Model/IO/IFileSystem.cs
@@ -1,3 +1,4 @@
+#nullable disable
#pragma warning disable CS1591
using System;
@@ -200,9 +201,9 @@ namespace MediaBrowser.Model.IO
IEnumerable<string> GetFileSystemEntryPaths(string path, bool recursive = false);
void SetHidden(string path, bool isHidden);
- void SetReadOnly(string path, bool readOnly);
+
void SetAttributes(string path, bool isHidden, bool readOnly);
+
List<FileSystemMetadata> GetDrives();
- void SetExecutable(string path);
}
}
diff --git a/MediaBrowser.Model/IO/IIsoManager.cs b/MediaBrowser.Model/IO/IIsoManager.cs
index 8b6af019d..299bb0a21 100644
--- a/MediaBrowser.Model/IO/IIsoManager.cs
+++ b/MediaBrowser.Model/IO/IIsoManager.cs
@@ -16,7 +16,6 @@ namespace MediaBrowser.Model.IO
/// <param name="isoPath">The iso path.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>IsoMount.</returns>
- /// <exception cref="ArgumentNullException">isoPath</exception>
/// <exception cref="IOException">Unable to create mount.</exception>
Task<IIsoMount> Mount(string isoPath, CancellationToken cancellationToken);
diff --git a/MediaBrowser.Model/IO/IIsoMount.cs b/MediaBrowser.Model/IO/IIsoMount.cs
index 72ec673ee..ea65d976a 100644
--- a/MediaBrowser.Model/IO/IIsoMount.cs
+++ b/MediaBrowser.Model/IO/IIsoMount.cs
@@ -8,7 +8,7 @@ namespace MediaBrowser.Model.IO
public interface IIsoMount : IDisposable
{
/// <summary>
- /// Gets or sets the iso path.
+ /// Gets the iso path.
/// </summary>
/// <value>The iso path.</value>
string IsoPath { get; }
diff --git a/MediaBrowser.Model/IO/IIsoMounter.cs b/MediaBrowser.Model/IO/IIsoMounter.cs
index 83fdb5fd6..0d257395a 100644
--- a/MediaBrowser.Model/IO/IIsoMounter.cs
+++ b/MediaBrowser.Model/IO/IIsoMounter.cs
@@ -10,6 +10,12 @@ namespace MediaBrowser.Model.IO
public interface IIsoMounter
{
/// <summary>
+ /// Gets the name.
+ /// </summary>
+ /// <value>The name.</value>
+ string Name { get; }
+
+ /// <summary>
/// Mounts the specified iso path.
/// </summary>
/// <param name="isoPath">The iso path.</param>
@@ -25,11 +31,5 @@ namespace MediaBrowser.Model.IO
/// <param name="path">The path.</param>
/// <returns><c>true</c> if this instance can mount the specified path; otherwise, <c>false</c>.</returns>
bool CanMount(string path);
-
- /// <summary>
- /// Gets the name.
- /// </summary>
- /// <value>The name.</value>
- string Name { get; }
}
}
diff --git a/MediaBrowser.Model/IO/IODefaults.cs b/MediaBrowser.Model/IO/IODefaults.cs
index f392dbcce..d9a1e6777 100644
--- a/MediaBrowser.Model/IO/IODefaults.cs
+++ b/MediaBrowser.Model/IO/IODefaults.cs
@@ -1,3 +1,5 @@
+using System.IO;
+
namespace MediaBrowser.Model.IO
{
/// <summary>
@@ -14,5 +16,10 @@ namespace MediaBrowser.Model.IO
/// The default file stream buffer size.
/// </summary>
public const int FileStreamBufferSize = 4096;
+
+ /// <summary>
+ /// The default <see cref="StreamWriter" /> buffer size.
+ /// </summary>
+ public const int StreamWriterBufferSize = 1024;
}
}
diff --git a/MediaBrowser.Model/IO/IShortcutHandler.cs b/MediaBrowser.Model/IO/IShortcutHandler.cs
index 5c663aa0d..14d5c4b62 100644
--- a/MediaBrowser.Model/IO/IShortcutHandler.cs
+++ b/MediaBrowser.Model/IO/IShortcutHandler.cs
@@ -22,7 +22,6 @@ namespace MediaBrowser.Model.IO
/// </summary>
/// <param name="shortcutPath">The shortcut path.</param>
/// <param name="targetPath">The target path.</param>
- /// <returns>System.String.</returns>
void Create(string shortcutPath, string targetPath);
}
}
diff --git a/MediaBrowser.Model/IO/IStreamHelper.cs b/MediaBrowser.Model/IO/IStreamHelper.cs
index e348cd725..0e09db16e 100644
--- a/MediaBrowser.Model/IO/IStreamHelper.cs
+++ b/MediaBrowser.Model/IO/IStreamHelper.cs
@@ -13,7 +13,6 @@ namespace MediaBrowser.Model.IO
Task CopyToAsync(Stream source, Stream destination, int bufferSize, int emptyReadLimit, CancellationToken cancellationToken);
- Task<int> CopyToAsync(Stream source, Stream destination, CancellationToken cancellationToken);
Task CopyToAsync(Stream source, Stream destination, long copyLength, CancellationToken cancellationToken);
Task CopyUntilCancelled(Stream source, Stream target, int bufferSize, CancellationToken cancellationToken);
diff --git a/MediaBrowser.Model/IO/IZipClient.cs b/MediaBrowser.Model/IO/IZipClient.cs
index 83e8a018d..fca52ebae 100644
--- a/MediaBrowser.Model/IO/IZipClient.cs
+++ b/MediaBrowser.Model/IO/IZipClient.cs
@@ -5,7 +5,7 @@ using System.IO;
namespace MediaBrowser.Model.IO
{
/// <summary>
- /// Interface IZipClient
+ /// Interface IZipClient.
/// </summary>
public interface IZipClient
{
@@ -26,6 +26,7 @@ namespace MediaBrowser.Model.IO
void ExtractAll(Stream source, string targetPath, bool overwriteExistingFiles);
void ExtractAllFromGz(Stream source, string targetPath, bool overwriteExistingFiles);
+
void ExtractFirstFileFromGz(Stream source, string targetPath, string defaultFileName);
/// <summary>