Skip to content

Commit

Permalink
Code cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
jp2masa committed Dec 26, 2018
1 parent 97aa856 commit 6c411b3
Showing 1 changed file with 6 additions and 29 deletions.
35 changes: 6 additions & 29 deletions source/Cosmos.System2/FileSystem/FAT/FatStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@ internal class FatStream : Stream

public FatStream(FatDirectoryEntry aEntry)
{
if (aEntry == null)
{
throw new ArgumentNullException(nameof(aEntry));
}

mDirectoryEntry = aEntry;
mDirectoryEntry = aEntry ?? throw new ArgumentNullException(nameof(aEntry));
mFS = aEntry.GetFileSystem();
mFatTable = aEntry.GetFatTable();
mSize = aEntry.mSize;
Expand All @@ -47,29 +42,11 @@ public FatStream(FatDirectoryEntry aEntry)
}
}

public override bool CanSeek
{
get
{
return true;
}
}
public override bool CanSeek => true;

public override bool CanRead
{
get
{
return true;
}
}
public override bool CanRead => true;

public override bool CanWrite
{
get
{
return true;
}
}
public override bool CanWrite => true;

public sealed override long Length
{
Expand All @@ -78,7 +55,7 @@ public sealed override long Length
Global.mFileSystemDebugger.SendInternal("-- FatStream.get_Length --");
Global.mFileSystemDebugger.SendInternal("Length =");
Global.mFileSystemDebugger.SendInternal(mSize);
return (long)mSize;
return mSize;
}
}

Expand All @@ -89,7 +66,7 @@ public override long Position
Global.mFileSystemDebugger.SendInternal("-- FatStream.get_Position --");
Global.mFileSystemDebugger.SendInternal("Position =");
Global.mFileSystemDebugger.SendInternal(mPosition);
return (long)mPosition;
return mPosition;
}
set
{
Expand Down

0 comments on commit 6c411b3

Please sign in to comment.