2026-05-22 14:29:22 +08:00
|
|
|
using FileShare_Common.Core;
|
2026-05-21 16:45:56 +08:00
|
|
|
|
2026-05-22 14:29:22 +08:00
|
|
|
namespace FileShare_Services.Services.FileLibrary
|
2026-05-21 16:45:56 +08:00
|
|
|
{
|
|
|
|
|
public interface IFileLibraryService
|
|
|
|
|
{
|
|
|
|
|
Task<List<DriveDto>> GetDrivesAsync(CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
|
|
|
Task<List<DirectoryDto>> GetDirectoriesAsync(string? path, CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
|
|
|
Task<List<LibraryRootDto>> GetRootsAsync(CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
|
|
|
Task<LibraryRootDto> AddRootAsync(AddLibraryRootRequest request, CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
|
|
|
Task<LibraryRootDto> SetRootEnabledAsync(UpdateLibraryRootRequest request, CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
|
|
|
Task DeleteRootAsync(DeleteLibraryRootRequest request, CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
|
|
|
Task<LibraryRootDto> ScanRootAsync(int rootId, CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
|
|
|
Task ScanDueRootsAsync(CancellationToken cancellationToken = default);
|
|
|
|
|
|
2026-05-22 11:18:47 +08:00
|
|
|
Task<PagedResponse<FileRecordDto>> SearchFilesAsync(SearchFilesRequest request, CancellationToken cancellationToken = default);
|
2026-05-21 16:45:56 +08:00
|
|
|
|
|
|
|
|
Task<FileRecordDto?> GetFileAsync(int id, CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
|
|
|
Task<TextPreviewDto?> GetTextPreviewAsync(int id, CancellationToken cancellationToken = default);
|
2026-05-22 11:59:45 +08:00
|
|
|
|
|
|
|
|
Task<BrowseDirectoryResponse> BrowseDirectoryAsync(BrowseDirectoryRequest request, CancellationToken cancellationToken = default);
|
2026-05-21 16:45:56 +08:00
|
|
|
}
|
|
|
|
|
}
|