protected override async Task <IEnumerable <StorageNode> > DoGetDirectoryContentsAsync(string path,
                                                                                               CancellationToken?cancellationToken = null)
        {
            await using var dbContext = GetDbContext();
            if (path.StartsWith("/"))
            {
                path = path.Substring(1);
            }

            var records = await dbContext.Records
                          .Where(r => r.Storage == StorageOptions.Name && r.Path.StartsWith(path))
                          .ToListAsync(cancellationToken ?? CancellationToken.None);

            var root = StorageNode.CreateDirectory("/", "/");

            foreach (var itemRecord in records)
            {
                var item = new StorageItem(
                    itemRecord.FilePath, itemRecord.LastModified, itemRecord.FileSize,
                    null, itemRecord.Metadata);
                root.AddItem(item);
            }

            var parts   = PreparePath(path.Trim('/')) !.Split("/");
            var current = root;

            foreach (var part in parts)
            {
                current = current?.Children.Where(n => n.Type == StorageNodeType.Directory)
                          .FirstOrDefault(f => f.Name == part);
            }

            return(current?.Children ?? new StorageNode[0]);
        }