Move StorageStream, NullFile, NullStorage

This commit is contained in:
Alex Barney 2021-12-19 00:16:47 -07:00
parent de2d6746fe
commit c6a09d1dfa
6 changed files with 11 additions and 8 deletions

View file

@ -2,6 +2,7 @@
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using LibHac.Fs; using LibHac.Fs;
using LibHac.Tools.FsSystem;
namespace LibHac.FsSystem; namespace LibHac.FsSystem;
@ -62,4 +63,4 @@ public class ConcatenationStorageSegment
Storage = storage; Storage = storage;
Offset = offset; Offset = offset;
} }
} }

View file

@ -5,6 +5,7 @@ using System.Runtime.InteropServices;
using LibHac.Common; using LibHac.Common;
using LibHac.Fs; using LibHac.Fs;
using LibHac.Fs.Fsa; using LibHac.Fs.Fsa;
using LibHac.Tools.FsSystem;
namespace LibHac.FsSystem; namespace LibHac.FsSystem;
@ -220,4 +221,4 @@ public static class StorageExtensions
if (stream == null) return null; if (stream == null) return null;
return new StreamStorage(stream, keepOpen).Slice(start, length); return new StreamStorage(stream, keepOpen).Slice(start, length);
} }
} }

View file

@ -2,7 +2,7 @@
using LibHac.Fs; using LibHac.Fs;
using LibHac.Fs.Fsa; using LibHac.Fs.Fsa;
namespace LibHac.FsSystem; namespace LibHac.Tools.FsSystem;
public class NullFile : IFile public class NullFile : IFile
{ {
@ -57,4 +57,4 @@ public class NullFile : IFile
{ {
return ResultFs.UnsupportedOperation.Log(); return ResultFs.UnsupportedOperation.Log();
} }
} }

View file

@ -1,7 +1,7 @@
using System; using System;
using LibHac.Fs; using LibHac.Fs;
namespace LibHac.FsSystem; namespace LibHac.Tools.FsSystem;
/// <summary> /// <summary>
/// An <see cref="IStorage"/> that returns all zeros when read, and does nothing on write. /// An <see cref="IStorage"/> that returns all zeros when read, and does nothing on write.
@ -40,4 +40,4 @@ public class NullStorage : IStorage
size = Length; size = Length;
return Result.Success; return Result.Success;
} }
} }

View file

@ -2,7 +2,7 @@
using System.IO; using System.IO;
using LibHac.Fs; using LibHac.Fs;
namespace LibHac.FsSystem; namespace LibHac.Tools.FsSystem;
public class StorageStream : Stream public class StorageStream : Stream
{ {
@ -77,4 +77,4 @@ public class StorageStream : Stream
if (!LeaveOpen) BaseStorage?.Dispose(); if (!LeaveOpen) BaseStorage?.Dispose();
base.Dispose(disposing); base.Dispose(disposing);
} }
} }

View file

@ -2,6 +2,7 @@
using LibHac.Common; using LibHac.Common;
using LibHac.Fs; using LibHac.Fs;
using LibHac.FsSystem; using LibHac.FsSystem;
using LibHac.Tools.FsSystem;
namespace LibHac.Tools.Ro; namespace LibHac.Tools.Ro;