-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathFileSystemAccessService.cs
More file actions
27 lines (23 loc) · 982 Bytes
/
FileSystemAccessService.cs
File metadata and controls
27 lines (23 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using KristofferStrube.Blazor.FileSystem;
using KristofferStrube.Blazor.WebIDL;
using Microsoft.JSInterop;
namespace KristofferStrube.Blazor.FileSystemAccess;
public class FileSystemAccessService :
BaseFileSystemAccessService<
FileSystemFileHandle,
FileSystemDirectoryHandle,
IJSObjectReference>,
IFileSystemAccessService
{
public FileSystemAccessService(IJSRuntime jSRuntime) : base(jSRuntime)
{
}
protected override Task<FileSystemDirectoryHandle> CreateDirectoryHandleAsync(IJSRuntime jSRuntime, IJSObjectReference jSReference, FileSystemOptions options)
{
return Task.FromResult(FileSystemDirectoryHandle.Create(jSRuntime, jSReference, options));
}
protected override Task<FileSystemFileHandle> CreateFileHandleAsync(IJSRuntime jSRuntime, IJSObjectReference jSReference, FileSystemOptions options)
{
return Task.FromResult(FileSystemFileHandle.Create(jSRuntime, jSReference, options));
}
}