ConsoleUI container size text
This commit is contained in:
@@ -28,4 +28,5 @@ public interface IContentProvider : IContainer, IOnContainerEnter
|
||||
Task<byte[]?> GetContentAsync(IElement element, int? maxLength = null, CancellationToken cancellationToken = default);
|
||||
bool CanHandlePath(NativePath path);
|
||||
bool CanHandlePath(FullName path);
|
||||
VolumeSizeInfo? GetVolumeSizeInfo(FullName path);
|
||||
}
|
||||
13
src/Core/FileTime.Core.Abstraction/Models/VolumeSizeInfo.cs
Normal file
13
src/Core/FileTime.Core.Abstraction/Models/VolumeSizeInfo.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace FileTime.Core.Models;
|
||||
|
||||
public readonly struct VolumeSizeInfo
|
||||
{
|
||||
public readonly long TotalSize;
|
||||
public readonly long FreeSize;
|
||||
|
||||
public VolumeSizeInfo(long totalSize, long freeSize)
|
||||
{
|
||||
TotalSize = totalSize;
|
||||
FreeSize = freeSize;
|
||||
}
|
||||
}
|
||||
@@ -90,5 +90,7 @@ public abstract class ContentProviderBase : IContentProvider
|
||||
|
||||
public abstract bool CanHandlePath(NativePath path);
|
||||
public bool CanHandlePath(FullName path) => CanHandlePath(GetNativePath(path));
|
||||
public abstract VolumeSizeInfo? GetVolumeSizeInfo(FullName path);
|
||||
|
||||
public IItem WithParent(AbsolutePath parent) => this;
|
||||
}
|
||||
@@ -85,5 +85,7 @@ public class RootContentProvider : IRootContentProvider
|
||||
public bool CanHandlePath(NativePath path) => throw new NotImplementedException();
|
||||
|
||||
public bool CanHandlePath(FullName path) => throw new NotImplementedException();
|
||||
public IItem WithParent(AbsolutePath parent) => this;
|
||||
public VolumeSizeInfo? GetVolumeSizeInfo(FullName path) => null;
|
||||
|
||||
public IItem WithParent(AbsolutePath parent) => this;
|
||||
}
|
||||
Reference in New Issue
Block a user