xoofx / zio

A cross-platform abstract/virtual filesystem framework with many built-ins filesystems for .NET
BSD 2-Clause "Simplified" License
817 stars 61 forks source link

Add MountFS.TryGetMount and MountFS.TryGetMountName #36

Closed Rohansi closed 5 years ago

Rohansi commented 5 years ago

These provide functionality to reverse lookup things inside of MountFS. AggregateFS can already accomplish this using FindFileSystemEntries which lists all of the results with their original IFileSystem.

I needed these because I have a MountFS instance that has an AggregateFS as its backup FS, but the mounts are all inside of the AggregateFS as well. This lets me access things with an optional mount name, but I needed a way to convert the non-mounted path into the mounted one.