Emet.FileSystems
0.0.6.1
dotnet add package Emet.FileSystems --version 0.0.6.1
NuGet\Install-Package Emet.FileSystems -Version 0.0.6.1
<PackageReference Include="Emet.FileSystems" Version="0.0.6.1" />
<PackageVersion Include="Emet.FileSystems" Version="0.0.6.1" />
<PackageReference Include="Emet.FileSystems" />
paket add Emet.FileSystems --version 0.0.6.1
#r "nuget: Emet.FileSystems, 0.0.6.1"
#:package Emet.FileSystems@0.0.6.1
#addin nuget:?package=Emet.FileSystems&version=0.0.6.1
#tool nuget:?package=Emet.FileSystems&version=0.0.6.1
Overview
Emet.Filesystems was created to solve two filesystem API problems that came up for me about the same time. Since Microsoft has not been interested in addressing the shortcomings of their APIs, I went ahead and did so.
Philosophy
Filesystem action functions throw when presented with something they cannot do.
Filesystem query functions do not throw when presented with files or directories that do not exist; however they do throw when presented with disk or network IO issues. I found this is behavior is the most conducive to writing reliable code in the face of unreliable power.
Emet.FileSystems does not call .NET System.IO functions but rather P/Invokes
native functions. Consequently, there is no platform-neutral build of Emet.FileSystems;
when you run dotnet publish
or its moral equivalent on the executable project,
the appropriate binary is selected automatically and copied into the build output directory.
Getting Started
Add Emet.FileSystems to your project. The current release is on nuget, so you don't have to worry about building it yourself.
The typical entry point is Emet.FileSystems.FileSystem
where useful functions
GetDirectoryContents()
, CreateHardLink()
, CreateSymbolicLink()
, ReadLink()
,
and RenameReplace()
are found. It is also possible to examine a path directly
by creating an Emet.FileSystems.DirectoryEntry
object.
There is copious documentation. The best way to read the documentation is to add Emet.FileSystems to a project in Visual Studio and use Object Browser to browse the public API and XML comments.
Individual IO errors may be caught and handled independently by writing code that looks like this:
catch (System.IOException ioex) when (ioex.HResult == Emet.FileSystems.IOErrors.NotADirectory)
You would most likely use using
directives to import namespaces, but the example is
easier to understand this way.
The members of Emet.FileSystems.IOErrors
are magic readonly variables, not constants.
You can reference them from an any
RID dll, upload that dll to your private nuget server
(or a public one for that matter), reference that dll from another dll in another codebase,
reference this dll from an executable compiled for some platform, and the members of
Emet.FileSystems.IOErrors
will take on the correct value for the target platform.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Emet.FileSystems:
Repository | Stars |
---|---|
SnowflakePowered/snowflake
:snowflake: :video_game: Emulator Frontend and SDK
|
Version | Downloads | Last Updated |
---|---|---|
0.0.6.1 | 201 | 4/29/2025 |
0.0.6 | 147 | 11/6/2024 |
0.0.5 | 8,334 | 4/3/2022 |
0.0.4 | 180,589 | 4/28/2021 |
0.0.3 | 138,384 | 5/12/2020 |
0.0.2 | 619 | 5/5/2020 |
0.0.1 | 1,538 | 10/8/2019 |
0.0.1-alpha2 | 505 | 8/20/2019 |
0.0.1-alpha1 | 655 | 1/1/2019 |