2.3 KiB
2.3 KiB
Development
Repository Layout
Main folders:
VirtualFS/VirtualFS/Implementation/VirtualFS/Physical/VirtualFS/Memory/VirtualFS/Compressed/VirtualFS/EmbeddedResource/VirtualFS.Tests/
Important files:
VirtualFS.slnVirtualFS/VirtualFS.csprojVirtualFS.Tests/VirtualFS.Tests.csprojDockerfile.github/workflows/docker.yml
Target Frameworks
Library targets:
netstandard2.0net472net6.0net8.0net10.0
Tests target:
net10.0
Build and Test
The repository uses a Docker-based build/test flow with the official .NET 10 SDK image.
Run the full containerized verification:
docker build --target test -t virtualfs:test .
This performs:
- restore
- build
- test
Test Stack
The test project currently uses:
- xUnit v3
Microsoft.NET.Test.Sdkcoverlet.collector
CI
The repository workflow is:
.github/workflows/docker.yml
It runs the same Docker build/test path on:
- pushes
- pull requests
Adding a New Backend
The expected implementation approach is:
- derive from
BaseFileSystem - implement the abstract operations required by
IFileSystem - return
VirtualStreamfor open file handles - populate entry metadata consistently
- respect read-only semantics
- add focused tests for backend-specific behavior
Backend responsibilities generally include:
- existence checks
- metadata lookup
- enumeration
- create/delete
- read/write stream opening
- rename/move/copy where backend-specific optimization is useful
Design Characteristics to Keep in Mind
These are important when changing the library:
- path semantics are custom and intentionally
/-based - directory vs file is determined by trailing slash
RootFileSystemcomposes mounted backends but is not itself writableEntry.Pathis backend-local,Entry.FullPathis root-visibleEntryRealPathmay be unavailable for some backends- unmounting depends on
IsBusy - generic copy/move logic may be correct but not optimal for remote backends
Documentation Structure
Current documentation:
- top-level overview:
README.md - architecture details:
docs/architecture.md - usage examples:
docs/usage.md - backend summary:
docs/backends.md - development notes:
docs/development.md