aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/IO
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2020-02-12 17:41:46 +0100
committerGitHub <noreply@github.com>2020-02-12 17:41:46 +0100
commita2490a7ae5c636d97085a0e950fbbe1a027bfdb0 (patch)
tree985eee14b4ed220cc090fb34f17a5129708dbf13 /MediaBrowser.Model/IO
parentddf9b38799fa4a0e227ae3c2516a72ec48f13854 (diff)
parente241f83ff12aa2231443b78d39d1db2646aebdf9 (diff)
Merge branch 'master' into images
Diffstat (limited to 'MediaBrowser.Model/IO')
-rw-r--r--MediaBrowser.Model/IO/FileSystemEntryType.cs13
-rw-r--r--MediaBrowser.Model/IO/FileSystemMetadata.cs10
-rw-r--r--MediaBrowser.Model/IO/IFileSystem.cs144
-rw-r--r--MediaBrowser.Model/IO/IIsoManager.cs3
-rw-r--r--MediaBrowser.Model/IO/IIsoMount.cs2
-rw-r--r--MediaBrowser.Model/IO/IIsoMounter.cs3
-rw-r--r--MediaBrowser.Model/IO/IODefaults.cs (renamed from MediaBrowser.Model/IO/StreamDefaults.cs)8
-rw-r--r--MediaBrowser.Model/IO/IShortcutHandler.cs5
-rw-r--r--MediaBrowser.Model/IO/IStreamHelper.cs3
-rw-r--r--MediaBrowser.Model/IO/IZipClient.cs3
10 files changed, 44 insertions, 150 deletions
diff --git a/MediaBrowser.Model/IO/FileSystemEntryType.cs b/MediaBrowser.Model/IO/FileSystemEntryType.cs
index a4ed2334d..7780d6fcc 100644
--- a/MediaBrowser.Model/IO/FileSystemEntryType.cs
+++ b/MediaBrowser.Model/IO/FileSystemEntryType.cs
@@ -1,24 +1,27 @@
namespace MediaBrowser.Model.IO
{
/// <summary>
- /// Enum FileSystemEntryType
+ /// Enum FileSystemEntryType.
/// </summary>
public enum FileSystemEntryType
{
/// <summary>
- /// The file
+ /// The file.
/// </summary>
File,
+
/// <summary>
- /// The directory
+ /// The directory.
/// </summary>
Directory,
+
/// <summary>
- /// The network computer
+ /// The network computer.
/// </summary>
NetworkComputer,
+
/// <summary>
- /// The network share
+ /// The network share.
/// </summary>
NetworkShare
}
diff --git a/MediaBrowser.Model/IO/FileSystemMetadata.cs b/MediaBrowser.Model/IO/FileSystemMetadata.cs
index 2a6d13959..8010e2dcd 100644
--- a/MediaBrowser.Model/IO/FileSystemMetadata.cs
+++ b/MediaBrowser.Model/IO/FileSystemMetadata.cs
@@ -1,3 +1,6 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
using System;
namespace MediaBrowser.Model.IO
@@ -9,26 +12,31 @@ namespace MediaBrowser.Model.IO
/// </summary>
/// <value><c>true</c> if exists; otherwise, <c>false</c>.</value>
public bool Exists { get; set; }
+
/// <summary>
/// Gets or sets the full name.
/// </summary>
/// <value>The full name.</value>
public string FullName { get; set; }
+
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
+
/// <summary>
/// Gets or sets the extension.
/// </summary>
/// <value>The extension.</value>
public string Extension { get; set; }
+
/// <summary>
/// Gets or sets the length.
/// </summary>
/// <value>The length.</value>
public long Length { get; set; }
+
/// <summary>
/// Gets or sets the name of the directory.
/// </summary>
@@ -40,11 +48,13 @@ namespace MediaBrowser.Model.IO
/// </summary>
/// <value>The last write time UTC.</value>
public DateTime LastWriteTimeUtc { get; set; }
+
/// <summary>
/// Gets or sets the creation time UTC.
/// </summary>
/// <value>The creation time UTC.</value>
public DateTime CreationTimeUtc { get; set; }
+
/// <summary>
/// Gets a value indicating whether this instance is directory.
/// </summary>
diff --git a/MediaBrowser.Model/IO/IFileSystem.cs b/MediaBrowser.Model/IO/IFileSystem.cs
index ca99b28ca..7e6fe7c09 100644
--- a/MediaBrowser.Model/IO/IFileSystem.cs
+++ b/MediaBrowser.Model/IO/IFileSystem.cs
@@ -1,11 +1,13 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
using System;
using System.Collections.Generic;
-using System.IO;
namespace MediaBrowser.Model.IO
{
/// <summary>
- /// Interface IFileSystem
+ /// Interface IFileSystem.
/// </summary>
public interface IFileSystem
{
@@ -99,20 +101,6 @@ namespace MediaBrowser.Model.IO
DateTime GetLastWriteTimeUtc(string path);
/// <summary>
- /// Gets the file stream.
- /// </summary>
- /// <param name="path">The path.</param>
- /// <param name="mode">The mode.</param>
- /// <param name="access">The access.</param>
- /// <param name="share">The share.</param>
- /// <param name="isAsync">if set to <c>true</c> [is asynchronous].</param>
- /// <returns>FileStream.</returns>
- Stream GetFileStream(string path, FileOpenMode mode, FileAccessMode access, FileShareMode share, bool isAsync = false);
-
- Stream GetFileStream(string path, FileOpenMode mode, FileAccessMode access, FileShareMode share,
- FileOpenOptions fileOpenOptions);
-
- /// <summary>
/// Swaps the files.
/// </summary>
/// <param name="file1">The file1.</param>
@@ -218,128 +206,4 @@ namespace MediaBrowser.Model.IO
List<FileSystemMetadata> GetDrives();
void SetExecutable(string path);
}
-
- //TODO Investigate if can be replaced by the one from System.IO ?
- public enum FileOpenMode
- {
- //
- // Summary:
- // Specifies that the operating system should create a new file. This requires System.Security.Permissions.FileIOPermissionAccess.Write
- // permission. If the file already exists, an System.IO.IOException exception is
- // thrown.
- CreateNew = 1,
- //
- // Summary:
- // Specifies that the operating system should create a new file. If the file already
- // exists, it will be overwritten. This requires System.Security.Permissions.FileIOPermissionAccess.Write
- // permission. FileMode.Create is equivalent to requesting that if the file does
- // not exist, use System.IO.FileMode.CreateNew; otherwise, use System.IO.FileMode.Truncate.
- // If the file already exists but is a hidden file, an System.UnauthorizedAccessException
- // exception is thrown.
- Create = 2,
- //
- // Summary:
- // Specifies that the operating system should open an existing file. The ability
- // to open the file is dependent on the value specified by the System.IO.FileAccess
- // enumeration. A System.IO.FileNotFoundException exception is thrown if the file
- // does not exist.
- Open = 3,
- //
- // Summary:
- // Specifies that the operating system should open a file if it exists; otherwise,
- // a new file should be created. If the file is opened with FileAccess.Read, System.Security.Permissions.FileIOPermissionAccess.Read
- // permission is required. If the file access is FileAccess.Write, System.Security.Permissions.FileIOPermissionAccess.Write
- // permission is required. If the file is opened with FileAccess.ReadWrite, both
- // System.Security.Permissions.FileIOPermissionAccess.Read and System.Security.Permissions.FileIOPermissionAccess.Write
- // permissions are required.
- OpenOrCreate = 4
- }
-
- public enum FileAccessMode
- {
- //
- // Summary:
- // Read access to the file. Data can be read from the file. Combine with Write for
- // read/write access.
- Read = 1,
- //
- // Summary:
- // Write access to the file. Data can be written to the file. Combine with Read
- // for read/write access.
- Write = 2
- }
-
- public enum FileShareMode
- {
- //
- // Summary:
- // Declines sharing of the current file. Any request to open the file (by this process
- // or another process) will fail until the file is closed.
- None = 0,
- //
- // Summary:
- // Allows subsequent opening of the file for reading. If this flag is not specified,
- // any request to open the file for reading (by this process or another process)
- // will fail until the file is closed. However, even if this flag is specified,
- // additional permissions might still be needed to access the file.
- Read = 1,
- //
- // Summary:
- // Allows subsequent opening of the file for writing. If this flag is not specified,
- // any request to open the file for writing (by this process or another process)
- // will fail until the file is closed. However, even if this flag is specified,
- // additional permissions might still be needed to access the file.
- Write = 2,
- //
- // Summary:
- // Allows subsequent opening of the file for reading or writing. If this flag is
- // not specified, any request to open the file for reading or writing (by this process
- // or another process) will fail until the file is closed. However, even if this
- // flag is specified, additional permissions might still be needed to access the
- // file.
- ReadWrite = 3
- }
-
- //
- // Summary:
- // Represents advanced options for creating a System.IO.FileStream object.
- [Flags]
- public enum FileOpenOptions
- {
- //
- // Summary:
- // Indicates that the system should write through any intermediate cache and go
- // directly to disk.
- WriteThrough = int.MinValue,
- //
- // Summary:
- // Indicates that no additional options should be used when creating a System.IO.FileStream
- // object.
- None = 0,
- //
- // Summary:
- // Indicates that a file is encrypted and can be decrypted only by using the same
- // user account used for encryption.
- Encrypted = 16384,
- //
- // Summary:
- // Indicates that a file is automatically deleted when it is no longer in use.
- DeleteOnClose = 67108864,
- //
- // Summary:
- // Indicates that the file is to be accessed sequentially from beginning to end.
- // The system can use this as a hint to optimize file caching. If an application
- // moves the file pointer for random access, optimum caching may not occur; however,
- // correct operation is still guaranteed.
- SequentialScan = 134217728,
- //
- // Summary:
- // Indicates that the file is accessed randomly. The system can use this as a hint
- // to optimize file caching.
- RandomAccess = 268435456,
- //
- // Summary:
- // Indicates that a file can be used for asynchronous reading and writing.
- Asynchronous = 1073741824
- }
}
diff --git a/MediaBrowser.Model/IO/IIsoManager.cs b/MediaBrowser.Model/IO/IIsoManager.cs
index eb0cb4bfb..1a11b6f70 100644
--- a/MediaBrowser.Model/IO/IIsoManager.cs
+++ b/MediaBrowser.Model/IO/IIsoManager.cs
@@ -1,3 +1,6 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
using System;
using System.Collections.Generic;
using System.IO;
diff --git a/MediaBrowser.Model/IO/IIsoMount.cs b/MediaBrowser.Model/IO/IIsoMount.cs
index 825c0c243..72ec673ee 100644
--- a/MediaBrowser.Model/IO/IIsoMount.cs
+++ b/MediaBrowser.Model/IO/IIsoMount.cs
@@ -3,7 +3,7 @@ using System;
namespace MediaBrowser.Model.IO
{
/// <summary>
- /// Interface IIsoMount
+ /// Interface IIsoMount.
/// </summary>
public interface IIsoMount : IDisposable
{
diff --git a/MediaBrowser.Model/IO/IIsoMounter.cs b/MediaBrowser.Model/IO/IIsoMounter.cs
index 766a9e4e6..1d110e82f 100644
--- a/MediaBrowser.Model/IO/IIsoMounter.cs
+++ b/MediaBrowser.Model/IO/IIsoMounter.cs
@@ -1,3 +1,6 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
using System;
using System.IO;
using System.Threading;
diff --git a/MediaBrowser.Model/IO/StreamDefaults.cs b/MediaBrowser.Model/IO/IODefaults.cs
index 4b55ce1f3..f392dbcce 100644
--- a/MediaBrowser.Model/IO/StreamDefaults.cs
+++ b/MediaBrowser.Model/IO/IODefaults.cs
@@ -1,18 +1,18 @@
namespace MediaBrowser.Model.IO
{
/// <summary>
- /// Class StreamDefaults.
+ /// Class IODefaults.
/// </summary>
- public static class StreamDefaults
+ public static class IODefaults
{
/// <summary>
/// The default copy to buffer size.
/// </summary>
- public const int DefaultCopyToBufferSize = 81920;
+ public const int CopyToBufferSize = 81920;
/// <summary>
/// The default file stream buffer size.
/// </summary>
- public const int DefaultFileStreamBufferSize = 4096;
+ public const int FileStreamBufferSize = 4096;
}
}
diff --git a/MediaBrowser.Model/IO/IShortcutHandler.cs b/MediaBrowser.Model/IO/IShortcutHandler.cs
index 2cc18274b..69b6f35e7 100644
--- a/MediaBrowser.Model/IO/IShortcutHandler.cs
+++ b/MediaBrowser.Model/IO/IShortcutHandler.cs
@@ -1,3 +1,6 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
namespace MediaBrowser.Model.IO
{
public interface IShortcutHandler
@@ -7,12 +10,14 @@ namespace MediaBrowser.Model.IO
/// </summary>
/// <value>The extension.</value>
string Extension { get; }
+
/// <summary>
/// Resolves the specified shortcut path.
/// </summary>
/// <param name="shortcutPath">The shortcut path.</param>
/// <returns>System.String.</returns>
string Resolve(string shortcutPath);
+
/// <summary>
/// Creates the specified shortcut path.
/// </summary>
diff --git a/MediaBrowser.Model/IO/IStreamHelper.cs b/MediaBrowser.Model/IO/IStreamHelper.cs
index 97d985df6..21a592971 100644
--- a/MediaBrowser.Model/IO/IStreamHelper.cs
+++ b/MediaBrowser.Model/IO/IStreamHelper.cs
@@ -1,3 +1,6 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
using System;
using System.IO;
using System.Threading;
diff --git a/MediaBrowser.Model/IO/IZipClient.cs b/MediaBrowser.Model/IO/IZipClient.cs
index eaddd6df3..1ae3893ac 100644
--- a/MediaBrowser.Model/IO/IZipClient.cs
+++ b/MediaBrowser.Model/IO/IZipClient.cs
@@ -1,3 +1,6 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
using System.IO;
namespace MediaBrowser.Model.IO