UI improvements
This commit is contained in:
@@ -15,14 +15,6 @@ namespace FileTime.Providers.Local
|
||||
private readonly IReadOnlyList<IItem>? _items;
|
||||
private readonly IReadOnlyList<IElement>? _elements = new List<IElement>().AsReadOnly();
|
||||
|
||||
/* public IReadOnlyList<IContainer> RootContainers { get; }
|
||||
|
||||
public IReadOnlyList<IItem> Items => RootContainers;
|
||||
|
||||
public IReadOnlyList<IContainer> Containers => RootContainers;
|
||||
|
||||
public IReadOnlyList<IElement> Elements { get; } = new List<IElement>(); */
|
||||
|
||||
public string Name { get; } = "local";
|
||||
|
||||
public string? FullName { get; }
|
||||
@@ -66,6 +58,8 @@ namespace FileTime.Providers.Local
|
||||
|
||||
public async Task Refresh() => await Refreshed.InvokeAsync(this, AsyncEventArgs.Empty);
|
||||
|
||||
public Task<IContainer> Clone() => Task.FromResult((IContainer)this);
|
||||
|
||||
public IContainer? GetParent() => _parent;
|
||||
public Task<IContainer> CreateContainer(string name) => throw new NotSupportedException();
|
||||
public Task<IElement> CreateElement(string name) => throw new NotSupportedException();
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace FileTime.Providers.Local
|
||||
|
||||
public IContainer? GetParent() => _parent;
|
||||
|
||||
public Task<IContainer> Clone() => Task.FromResult((IContainer)new LocalFolder(Directory, Provider, _parent));
|
||||
|
||||
public Task Refresh()
|
||||
{
|
||||
_containers = new List<IContainer>();
|
||||
|
||||
@@ -64,6 +64,8 @@ namespace FileTime.Providers.Smb
|
||||
|
||||
public IContainer? GetParent() => _parent;
|
||||
|
||||
public Task<IContainer> Clone() => Task.FromResult((IContainer)this);
|
||||
|
||||
public async Task<bool> IsExists(string name) => (await GetItems())?.Any(i => i.Name == name) ?? false;
|
||||
|
||||
public async Task Refresh() => await Refreshed.InvokeAsync(this, AsyncEventArgs.Empty);
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace FileTime.Providers.Smb
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<IContainer> Clone() => Task.FromResult((IContainer)this);
|
||||
|
||||
public async Task<IItem?> GetByPath(string path)
|
||||
{
|
||||
var paths = path.Split(Constants.SeparatorChar);
|
||||
|
||||
@@ -92,6 +92,8 @@ namespace FileTime.Providers.Smb
|
||||
await Refreshed.InvokeAsync(this, AsyncEventArgs.Empty);
|
||||
}
|
||||
|
||||
public Task<IContainer> Clone() => Task.FromResult((IContainer)this);
|
||||
|
||||
private async Task<ISMBClient> GetSmbClient()
|
||||
{
|
||||
if (_client == null)
|
||||
|
||||
@@ -88,6 +88,8 @@ namespace FileTime.Providers.Smb
|
||||
|
||||
public IContainer? GetParent() => _parent;
|
||||
|
||||
public Task<IContainer> Clone() => Task.FromResult((IContainer)this);
|
||||
|
||||
public Task<bool> IsExists(string name)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
Reference in New Issue
Block a user