Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork63
A cross-platform abstract/virtual filesystem framework with many built-ins filesystems for .NET
License
xoofx/zio
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Zio provides a simple, powerful, cross-platformfilesystem abstraction for .NET with many built-ins filesystems.
- Compatible with
netstandard2.0
,netstandard2.1
andnet8.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 (followingUnix 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
Accessing a physical filesystem:
varfs=newPhysicalFileSystem();foreach(vardirinfs.EnumerateDirectories("/mnt/c")){// ...}
Using an in-memory filesystem:
varfs=newMemoryFileSystem();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.
Thedocumentation is directly available as part of this repository in the/doc
folder.
Zio is available as a NuGet package:
In order to build Zio, you need to install Visual Studio 2022 with latest.NET 7.0
This software is released under theBSD-Clause 2 license.
The logo isFile
byjeff from the Noun Project
Alexandre MUTEL akaxoofx
About
A cross-platform abstract/virtual filesystem framework with many built-ins filesystems for .NET
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors13
Uh oh!
There was an error while loading.Please reload this page.