
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
SharpFileSystemV2.SevenZip
Advanced tools
Access archives supported by 7-zip as a virtual file system Support .NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0 Support .NET Framework 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
SharpFileSystem is a Virtual File System (VFS) implementation for .NET to allow access to different filesystems in the same way for normal files and directories.
After looking a long time for a VFS for .NET, so that I could read files and directories in archives (zip and rar) the same way as any ordinary files and directories. I couldn't find any complete solution for this problem, so I decided to implement a VFS myself. Also what I didn't like in the ordinary filesystems was the path-system. It allowed relative paths (like ..), which can often lead to security issues without explicit checking. It allows referring to directories the same way as referring to files. This often leads to strange behavior, like copying a directory (source) to another directory (destination), here it is often vague whether the destination directory should be overwritten or if it should copy the source-directory inside the destination-directory.
At the moment the following filesystems are implemented:
There are also filesystems that alter the exposed structure of existing filesystems. These allow you to mix different systems together to get the desired file-structure:
At the heart of the system there is the IFileSystem interface. This describes the operations that should be provided by every filesystem:
public interface IFileSystem : IDisposable
{
ICollection<FileSystemPath> GetEntities(FileSystemPath path);
bool Exists(FileSystemPath path);
Stream CreateFile(FileSystemPath path);
Stream OpenFile(FileSystemPath path, FileAccess access);
void CreateDirectory(FileSystemPath path);
void Delete(FileSystemPath path);
}
Normally in .NET/Mono we refer to files by their path coded as a string. This sometimes leads to inconsistencies, which is why I've created the type FileSystemPath to encapsulate the path in SharpFileSystem. There are operations that help create and alter the path, but the rules of using them are more strict, which creates a much more robust environment for the programmer:
/./. This means: there are no relative paths././.System.IO.Path.Combine for .NET).Some examples of using FileSystemPath:
| Operation | Result |
|---|---|
var root = FileSystemPath.Root | / |
var mydir = root.AppendDirectory("mydir") | /mydir/ |
var myfile = mydir.AppendFile("myfile") | /mydir/myfile |
myfile.AppendFile("myfile2") | Error: The specified FileSystemPath is not a directory. |
mydir.ParentPath | / |
FAQs
Access archives supported by 7-zip as a virtual file system Support .NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0 Support .NET Framework 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
We found that sharpfilesystemv2.sevenzip demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.