Zio 0.16.2
dotnet add package Zio --version 0.16.2
NuGet\Install-Package Zio -Version 0.16.2
<PackageReference Include="Zio" Version="0.16.2" />
paket add Zio --version 0.16.2
#r "nuget: Zio, 0.16.2"
// Install Zio as a Cake Addin
#addin nuget:?package=Zio&version=0.16.2
// Install Zio as a Cake Tool
#tool nuget:?package=Zio&version=0.16.2
Zio

<img align="right" width="160px" height="160px" src="https://raw.githubusercontent.com/xoofx/zio/main/img/zio.png">
Zio provides a simple, powerful, cross-platform filesystem abstraction for .NET with many built-ins filesystems.
Features
- Compatible with
.NET 4.0
,4.5+
,netstandard2.0
,netstandard2.1
andnet6.0
- API providing all operations provided by the regular System.IO API (e.g File.Move, Directory.Delete... etc.)
- Allowing atomic filesystem operations (e.g File.Replace...)
- A simple interface abstraction
IFileSystem
- Supports for filesystem watcher through the
IFileSystem.Watch
method and theIFileSystemWatcher
interface- For all builtin filesystems (aggregates, memory...etc.)
- All paths are normalized through a lightweight uniform path struct
UPath
- Multiple built-ins filesystems:
PhysicalFileSystem
to access the physical disks, directories and folders.- With uniform paths, this filesystem on Windows is working like on a Windows Subsystem Linux (WSL), by remapping drives to mount directory (e.g path
/mnt/c/Windows
equivalent toC:\Windows
)
- With uniform paths, this filesystem on Windows is working like on a Windows Subsystem Linux (WSL), by remapping drives to mount directory (e.g path
MemoryFileSystem
to access a filesystem in memory:- Trying to be 100% compatible with a true
PhysicalFileSystem
(including exceptions) - Efficient concurrency with a per node (file or directory) locking mechanism
- A safe hierarchical locking strategy (following Unix kernel recommendations for directory locking)
- Support for
FileShare.Read
,FileShare.Write
andFileShare.ReadWrite
- Internally support for filesystem atomic operations (
File.Replace
)
- Trying to be 100% compatible with a true
ZipArchiveFileSystem
to access zip archives:- This filesystem is a wrapper around the
ZipArchive
class - It can work in case sensitive and case insensitive mode
- Support for
FileShare.Read
withZipArchiveMode.Read
- This filesystem is a wrapper around the
- On top of these final filesystem, you can compose more complex filesystems:
AggregateFileSystem
providing a read-only filesystem aggregating multiple filesystem that offers a merged viewMountFileSystem
to mount different filesystems at a specific mount point nameSubFileSystem
to view a sub-folder of another filesystem as if it was a root/
directoryReadOnlyFileSystem
to interact safely with another filesystem in read-only mode
- Higher level API similar to
FileSystemEntry
,FileEntry
andDirectoryEntry
offering a similar API to their respectiveFileSystemInfo
,FileInfo
,DirectoryInfo
Usage
Accessing a physical filesystem:
var fs = new PhysicalFileSystem();
foreach(var dir in fs.EnumerateDirectories("/mnt/c"))
{
// ...
}
Using an in-memory filesystem:
var fs = new MemoryFileSystem();
fs.WriteAllText("/temp.txt", "This is a content");
if (fs.FileExists("/temp.txt"))
{
Console.WriteLine("The content of the file:" + fs.ReadAllText("/temp.txt"))
}
The following documentation provides more information about the API and how to use it.
Documentation
The documentation is directly available as part of this repository in the /doc
folder.
Download
Zio is available as a NuGet package:
Build
In order to build Zio, you need to install Visual Studio 2022 with latest .NET 6.0
License
This software is released under the BSD-Clause 2 license.
Credits
The logo is File
by jeff from the Noun Project
Author
Alexandre MUTEL aka xoofx
Product | Versions |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows |
.NET Core | netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard | netstandard2.0 netstandard2.1 |
.NET Framework | net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48 net481 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen40 tizen60 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.5
- System.IO.Compression (>= 4.3.0)
-
.NETStandard 2.0
- System.IO.Compression (>= 4.3.0)
- System.IO.Compression.ZipFile (>= 4.3.0)
-
.NETStandard 2.1
- System.IO.Compression (>= 4.3.0)
- System.IO.Compression.ZipFile (>= 4.3.0)
-
net6.0
- No dependencies.
NuGet packages (15)
Showing the top 5 NuGet packages that depend on Zio:
Package | Downloads |
---|---|
Libplanet
A .NET library for creating multiplayer online game in decentralized fashion. See also the docs for details: https://docs.libplanet.io/ |
|
com.csutil.cscore
cscore is a lightweight library providing commonly used helpers and patterns for all your C# projects including Logging, PubSub and Injection. See more details at https://github.com/cs-util-com/cscore |
|
Borg.Transporter.Core
Common code for the Transporter client. |
|
Test262Harness
Test262 Harness for .NET |
|
CppAst.CodeGen
CppAst.CodeGen is an extensible P/Invoke Code Generator from C++ to C# for .NET |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on Zio:
Repository | Stars |
---|---|
planetarium/libplanet
Blockchain toolkit in C#/.NET for decentralized game
|
|
SnowflakePowered/snowflake
:snowflake: :video_game: Emulator Frontend and SDK
|
|
cs-util-com/cscore
cscore is a minimal-footprint library providing commonly used helpers & patterns for your C# projects. It can be used in both pure C# and Unity projects.
|
Version | Downloads | Last updated |
---|---|---|
0.16.2 | 799 | 1/24/2023 |
0.16.1 | 2,860 | 11/14/2022 |
0.16.0 | 213 | 11/12/2022 |
0.15.0 | 14,164 | 4/24/2022 |
0.14.0 | 5,698 | 2/4/2022 |
0.13.0 | 32,046 | 8/31/2021 |
0.12.0 | 2,470 | 5/31/2021 |
0.11.0 | 9,883 | 12/24/2020 |
0.10.0 | 410 | 12/23/2020 |
0.9.1 | 47,528 | 6/18/2020 |
0.9.0 | 596 | 6/17/2020 |
0.8.0 | 61,083 | 4/19/2020 |
0.7.6 | 46,816 | 1/28/2020 |
0.7.5 | 488 | 1/28/2020 |
0.7.4 | 336,230 | 5/11/2019 |
0.7.3 | 2,727 | 2/6/2019 |
0.7.2 | 4,649 | 4/4/2018 |
0.7.1 | 5,803 | 1/12/2018 |
0.7.0 | 957 | 1/11/2018 |
0.6.0 | 1,176 | 12/23/2017 |
0.5.0 | 999 | 12/10/2017 |
0.4.0 | 974 | 12/9/2017 |
0.3.6 | 1,165 | 11/19/2017 |
0.3.5 | 1,004 | 11/19/2017 |
0.3.4 | 1,005 | 11/19/2017 |
0.3.3 | 1,015 | 11/19/2017 |
0.3.2 | 1,002 | 11/14/2017 |
0.3.1 | 956 | 5/15/2017 |
0.3.0 | 861 | 5/14/2017 |
0.2.0 | 925 | 5/5/2017 |
0.1.0 | 891 | 5/1/2017 |