Hacker News new | ask | show | jobs
by shimodateakira 657 days ago
Version 0.9.1 - Prerelease

This is the prerelease of the project, focusing on bug fixes, enhancements, and new features.

New Features:

Adapter for Items and Symbolic Links in Indexer (#189)

We've added new adapters for items and symbolic links to improve the indexing capabilities of the VirtualStorage class. This allows for more intuitive access and manipulation of items and symbolic links within the storage.

Added Classes:

  VirtualItemAdapter<T>
  VirtualSymbolicLinkAdapter<T>
These adapters provide a streamlined way to interact with items and symbolic links in the storage, enhancing usability and functionality.

Example Usage:

Below is an example demonstrating the new adapters in action:

VirtualStorage<int> vs = new();

vs["/"] += new VirtualDirectory("dir1");

vs["/dir1"] += new VirtualItem<int>("item1", 123);

vs["/"] += new VirtualSymbolicLink("link1", "/dir1/item1");

Console.WriteLine($"item1 ItemData = {vs.Item["/dir1/item1"].ItemData}");

Console.WriteLine($"link1 TargetPath = {vs.Link["/link1"].TargetPath}");

Console.WriteLine($"link1 ItemData = {vs.Item["/link1"].ItemData}");

output:

item1 ItemData = 123

link1 TargetPath = /dir1/item1

link1 ItemData = 123