Switched to database scheme seperation from MoonCores SingleDb. Updated mooncore versions. Updating to correct Async naming
This commit is contained in:
@@ -18,21 +18,21 @@ public class SystemFsAccess : IFsAccess, ICombineAccess, IArchiveAccess, IDownlo
|
||||
ApiClient = apiClient;
|
||||
}
|
||||
|
||||
public async Task CreateFile(string path)
|
||||
public async Task CreateFileAsync(string path)
|
||||
{
|
||||
await ApiClient.Post(
|
||||
$"{BaseApiUrl}/touch?path={path}"
|
||||
);
|
||||
}
|
||||
|
||||
public async Task CreateDirectory(string path)
|
||||
public async Task CreateDirectoryAsync(string path)
|
||||
{
|
||||
await ApiClient.Post(
|
||||
$"{BaseApiUrl}/mkdir?path={path}"
|
||||
);
|
||||
}
|
||||
|
||||
public async Task<FsEntry[]> List(string path)
|
||||
public async Task<FsEntry[]> ListAsync(string path)
|
||||
{
|
||||
var entries = await ApiClient.GetJson<FileSystemEntryResponse[]>(
|
||||
$"{BaseApiUrl}/list?path={path}"
|
||||
@@ -48,14 +48,14 @@ public class SystemFsAccess : IFsAccess, ICombineAccess, IArchiveAccess, IDownlo
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
public async Task Move(string oldPath, string newPath)
|
||||
public async Task MoveAsync(string oldPath, string newPath)
|
||||
{
|
||||
await ApiClient.Post(
|
||||
$"{BaseApiUrl}/move?oldPath={oldPath}&newPath={newPath}"
|
||||
);
|
||||
}
|
||||
|
||||
public async Task Read(string path, Func<Stream, Task> onHandleData)
|
||||
public async Task ReadAsync(string path, Func<Stream, Task> onHandleData)
|
||||
{
|
||||
await using var stream = await ApiClient.GetStream(
|
||||
$"{BaseApiUrl}/download?path={path}"
|
||||
@@ -66,7 +66,7 @@ public class SystemFsAccess : IFsAccess, ICombineAccess, IArchiveAccess, IDownlo
|
||||
stream.Close();
|
||||
}
|
||||
|
||||
public async Task Write(string path, Stream dataStream)
|
||||
public async Task WriteAsync(string path, Stream dataStream)
|
||||
{
|
||||
using var multiPartForm = new MultipartFormDataContent();
|
||||
|
||||
@@ -78,14 +78,14 @@ public class SystemFsAccess : IFsAccess, ICombineAccess, IArchiveAccess, IDownlo
|
||||
);
|
||||
}
|
||||
|
||||
public async Task Delete(string path)
|
||||
public async Task DeleteAsync(string path)
|
||||
{
|
||||
await ApiClient.Delete(
|
||||
$"{BaseApiUrl}/delete?path={path}"
|
||||
);
|
||||
}
|
||||
|
||||
public async Task Combine(string destination, string[] files)
|
||||
public async Task CombineAsync(string destination, string[] files)
|
||||
{
|
||||
await ApiClient.Post(
|
||||
$"{BaseApiUrl}/combine",
|
||||
@@ -103,7 +103,7 @@ public class SystemFsAccess : IFsAccess, ICombineAccess, IArchiveAccess, IDownlo
|
||||
new("tar.gz", ["tar.gz"], "Tar.gz Archive")
|
||||
];
|
||||
|
||||
public async Task Archive(
|
||||
public async Task ArchiveAsync(
|
||||
string destination,
|
||||
ArchiveFormat format,
|
||||
string root,
|
||||
@@ -120,7 +120,7 @@ public class SystemFsAccess : IFsAccess, ICombineAccess, IArchiveAccess, IDownlo
|
||||
});
|
||||
}
|
||||
|
||||
public async Task Unarchive(
|
||||
public async Task UnarchiveAsync(
|
||||
string path,
|
||||
ArchiveFormat format,
|
||||
string destination,
|
||||
@@ -137,13 +137,13 @@ public class SystemFsAccess : IFsAccess, ICombineAccess, IArchiveAccess, IDownlo
|
||||
);
|
||||
}
|
||||
|
||||
public async Task<string> GetFileUrl(string path)
|
||||
=> await GetDownloadUrl(path);
|
||||
public async Task<string> GetFileUrlAsync(string path)
|
||||
=> await GetDownloadUrlAsync(path);
|
||||
|
||||
public async Task<string> GetFolderUrl(string path)
|
||||
=> await GetDownloadUrl(path);
|
||||
public async Task<string> GetFolderUrlAsync(string path)
|
||||
=> await GetDownloadUrlAsync(path);
|
||||
|
||||
private async Task<string> GetDownloadUrl(string path)
|
||||
private async Task<string> GetDownloadUrlAsync(string path)
|
||||
{
|
||||
var response = await ApiClient.PostJson<DownloadUrlResponse>(
|
||||
$"{BaseApiUrl}/downloadUrl?path={path}"
|
||||
|
||||
Reference in New Issue
Block a user