NativePath, Editor, ToastMessageSink
This commit is contained in:
@@ -24,6 +24,7 @@ namespace FileTime.Providers.Smb
|
||||
public string Name { get; } = "smb";
|
||||
|
||||
public string? FullName { get; }
|
||||
public string? NativePath => null;
|
||||
|
||||
public bool IsHidden => false;
|
||||
public bool IsLoaded => true;
|
||||
@@ -177,5 +178,7 @@ namespace FileTime.Providers.Smb
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetNativePath(string fullName) => fullName.Replace("/", "\\");
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
using FileTime.Core.Models;
|
||||
using FileTime.Core.Providers;
|
||||
using SMBLibrary.Client;
|
||||
|
||||
namespace FileTime.Providers.Smb
|
||||
{
|
||||
@@ -11,6 +10,7 @@ namespace FileTime.Providers.Smb
|
||||
public string Name { get; }
|
||||
|
||||
public string? FullName { get; }
|
||||
public string? NativePath { get; }
|
||||
|
||||
public bool IsHidden => false;
|
||||
public SupportsDelete CanDelete => SupportsDelete.True;
|
||||
@@ -25,6 +25,7 @@ namespace FileTime.Providers.Smb
|
||||
{
|
||||
Name = name;
|
||||
FullName = parent.FullName + Constants.SeparatorChar + Name;
|
||||
NativePath = SmbContentProvider.GetNativePath(FullName);
|
||||
|
||||
Provider = provider;
|
||||
_parent = parent;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using AsyncEvent;
|
||||
using FileTime.Core.Models;
|
||||
using FileTime.Core.Providers;
|
||||
using SMBLibrary;
|
||||
using SMBLibrary.Client;
|
||||
|
||||
namespace FileTime.Providers.Smb
|
||||
{
|
||||
@@ -17,6 +15,7 @@ namespace FileTime.Providers.Smb
|
||||
public string Name { get; }
|
||||
|
||||
public string? FullName { get; }
|
||||
public string? NativePath { get; }
|
||||
|
||||
public bool IsHidden => false;
|
||||
public bool IsLoaded => _items != null;
|
||||
@@ -40,6 +39,7 @@ namespace FileTime.Providers.Smb
|
||||
|
||||
Name = name;
|
||||
FullName = parent?.FullName == null ? Name : parent.FullName + Constants.SeparatorChar + Name;
|
||||
NativePath = SmbContentProvider.GetNativePath(FullName);
|
||||
Provider = contentProvider;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace FileTime.Providers.Smb
|
||||
public string? Password { get; private set; }
|
||||
|
||||
public string Name { get; }
|
||||
|
||||
public string? FullName { get; }
|
||||
public string? NativePath { get; }
|
||||
|
||||
public bool IsHidden => false;
|
||||
public bool IsLoaded => _items != null;
|
||||
@@ -51,7 +51,7 @@ namespace FileTime.Providers.Smb
|
||||
Password = password;
|
||||
|
||||
Provider = contentProvider;
|
||||
FullName = Name = path;
|
||||
NativePath = FullName = Name = path;
|
||||
}
|
||||
|
||||
public async Task<IReadOnlyList<IItem>?> GetItems(CancellationToken token = default)
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace FileTime.Providers.Smb
|
||||
public string Name { get; }
|
||||
|
||||
public string? FullName { get; }
|
||||
public string? NativePath { get; }
|
||||
|
||||
public bool IsHidden => false;
|
||||
public bool IsLoaded => _items != null;
|
||||
@@ -40,6 +41,7 @@ namespace FileTime.Providers.Smb
|
||||
|
||||
Name = name;
|
||||
FullName = parent?.FullName == null ? Name : parent.FullName + Constants.SeparatorChar + Name;
|
||||
NativePath = SmbContentProvider.GetNativePath(FullName);
|
||||
Provider = contentProvider;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user