Skip to content

Commit d485be4

Browse files
authored
Rename path argument to directoyPath (#619)
To help indicaite that we want a directory
1 parent eb209c7 commit d485be4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Src/Fido2/Metadata/FileSystemMetadataRepository.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ namespace Fido2NetLib;
1212

1313
public sealed class FileSystemMetadataRepository : IMetadataRepository
1414
{
15-
private readonly string _path;
15+
private readonly string _directoryPath;
1616
private readonly Dictionary<Guid, MetadataBLOBPayloadEntry> _entries;
1717
private MetadataBLOBPayload? _blob;
1818

19-
public FileSystemMetadataRepository(string path)
19+
public FileSystemMetadataRepository(string directoryPath)
2020
{
21-
_path = path;
21+
_directoryPath = directoryPath;
2222
_entries = new Dictionary<Guid, MetadataBLOBPayloadEntry>();
2323
}
2424

@@ -37,9 +37,9 @@ public FileSystemMetadataRepository(string path)
3737

3838
public async Task<MetadataBLOBPayload> GetBLOBAsync(CancellationToken cancellationToken = default)
3939
{
40-
if (Directory.Exists(_path))
40+
if (Directory.Exists(_directoryPath))
4141
{
42-
foreach (var filename in Directory.GetFiles(_path))
42+
foreach (var filename in Directory.GetFiles(_directoryPath))
4343
{
4444
await using var fileStream = new FileStream(filename, FileMode.Open, FileAccess.Read);
4545
MetadataStatement statement = await JsonSerializer.DeserializeAsync(fileStream, FidoModelSerializerContext.Default.MetadataStatement, cancellationToken: cancellationToken) ?? throw new NullReferenceException(nameof(statement));

0 commit comments

Comments
 (0)