![]() |
VOOZH | about |
dotnet add package SharpCoreFileSystem --version 1.1.6
NuGet\Install-Package SharpCoreFileSystem -Version 1.1.6
<PackageReference Include="SharpCoreFileSystem" Version="1.1.6" />
<PackageVersion Include="SharpCoreFileSystem" Version="1.1.6" />Directory.Packages.props
<PackageReference Include="SharpCoreFileSystem" />Project file
paket add SharpCoreFileSystem --version 1.1.6
#r "nuget: SharpCoreFileSystem, 1.1.6"
#:package SharpCoreFileSystem@1.1.6
#addin nuget:?package=SharpCoreFileSystem&version=1.1.6Install as a Cake Addin
#tool nuget:?package=SharpCoreFileSystem&version=1.1.6Install as a Cake Tool
This a repository is a fork of bobvanderlinden/sharpfilesystem. It ports it to netstandard2.0.
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 |
/ |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 3 NuGet packages that depend on SharpCoreFileSystem:
| Package | Downloads |
|---|---|
|
Jobbr.Dashboard
Dashboard for Jobbr |
|
|
Jobbr.Dashboard.MonkeyPatched
Dashboard for Jobbr |
|
|
JF.VFS
A compatibility layer between Sharp(Core)FileSystem and Dokan.Net |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.6 | 11,464 | 7/30/2025 |
| 1.1.5 | 321 | 4/3/2025 |
| 1.1.4 | 250 | 4/3/2025 |
| 1.1.3 | 227 | 4/2/2025 |
| 1.1.2 | 2,324 | 5/30/2024 |
| 1.1.1 | 42,348 | 5/16/2023 |
| 1.1.0 | 297 | 5/16/2023 |
| 1.0.9 | 287 | 5/15/2023 |
| 1.0.7 | 17,407 | 2/13/2023 |
| 1.0.6 | 1,649 | 12/5/2022 |
| 1.0.5 | 473 | 12/5/2022 |
| 1.0.4 | 1,576 | 7/15/2022 |
| 1.0.3 | 613 | 7/11/2022 |
| 1.0.2 | 603 | 7/7/2022 |
| 1.0.1 | 1,062 | 5/26/2020 |
| 1.0.0 | 723 | 11/15/2019 |