Bathos.Platform.Windows
1.2.0
dotnet add package Bathos.Platform.Windows --version 1.2.0
NuGet\Install-Package Bathos.Platform.Windows -Version 1.2.0
<PackageReference Include="Bathos.Platform.Windows" Version="1.2.0" />
<PackageVersion Include="Bathos.Platform.Windows" Version="1.2.0" />
<PackageReference Include="Bathos.Platform.Windows" />
paket add Bathos.Platform.Windows --version 1.2.0
#r "nuget: Bathos.Platform.Windows, 1.2.0"
#:package Bathos.Platform.Windows@1.2.0
#addin nuget:?package=Bathos.Platform.Windows&version=1.2.0
#tool nuget:?package=Bathos.Platform.Windows&version=1.2.0
Native platform abstractions for .NET
Common .NET interfaces for native OS operations: atomic file publication, file inspection and leases, desktop integration, screen color sampling, installed color profiles, native paths, and standard directories.
Choose the providers your application needs, compose them explicitly, and pass focused capability interfaces to the components that use them. The libraries have no UI toolkit or dependency injection container dependencies. Linux icon rendering uses system imaging libraries. Your application owns its UI loop, application targets, and storage policy.
.NET 10 · MIT license. All four packages share a version and follow Semantic Versioning. Linux implementations remain experimental; their public APIs have the same compatibility commitment, and the Linux package follows the same stable/prerelease channel as the other packages.
Capabilities
| Capability | Windows | macOS | Linux |
|---|---|---|---|
| Atomic file publication and rename | Available | Available | Available |
| Snapshot replacement with retained readers | Available | Available | Available |
| Regular-file inspection | Available | Available | Available |
| Native paths and file URIs | Available | Available | Available |
| Standard directories and application scoping | Available | Available | Available |
| Cooperative shared/exclusive file leases | Available | Available | Available |
| File-manager reveal | Explorer | Finder | FileManager1 service |
| Application handoff and native lookup | Executable / App Paths | Executable / app bundle | Executable / desktop entry |
| System-default file opening | Shell open | LaunchServices | GIO default activation |
| Application icons | Native RGBA | Native RGBA | RGBA; native libraries required |
| File-driven application discovery | Shell registrations | NSWorkspace file lookup | GIO content-type registrations |
| Screen color sampling | Host dispatcher | Host dispatcher | Portal opt-in |
| Installed color profiles | Available | Available | Unavailable |
Availability describes the built-in implementations. Native operations require the matching OS and may require filesystem support, desktop services, or permissions. A null capability means unsupported or unconfigured; a null screen sample means user cancellation. Operation failures remain distinct. Linux's experimental status applies throughout the table.
See platform support and prerequisites before deployment, including headless Linux use, native library requirements, and the limits of the tested configurations.
Packages
Install only the providers you intend to support. Each provider depends on the core package and the .NET runtime; the core is included transitively.
- Bathos.Platform: shared contracts and file publication.
- Bathos.Platform.Windows: Windows implementations.
- Bathos.Platform.MacOS: macOS implementations.
- Bathos.Platform.Linux: Linux implementations.
Packages contain net10.0 libraries, XML API documentation, this README, and MIT license text.
Portable PDB symbols are published as .snupkg files. Native OS frameworks and Linux system
libraries come from the host. Engineering harnesses and test applications are not shipped.
Get started
In a .NET 10 console project, install all three providers for the cross-platform example below. These commands select the latest stable packages:
dotnet add package Bathos.Platform.Windows
dotnet add package Bathos.Platform.MacOS
dotnet add package Bathos.Platform.Linux
Write a complete file to private staging, then publish it under the first available name:
using Bathos.Platform;
using Bathos.Platform.Files;
using Bathos.Platform.Linux;
using Bathos.Platform.MacOS;
using Bathos.Platform.Windows;
var platform = PlatformProviders.SelectCurrent(
new WindowsPlatformProvider(), new MacOSPlatformProvider(), new LinuxPlatformProvider());
var rename = platform.FileRename ?? throw new PlatformNotSupportedException("Native publication is unavailable.");
await using var publication = new FilePublication(Path.GetFullPath("published-files"), rename);
await publication.Stream.WriteAsync("Hello from .NET!\n"u8.ToArray());
var path = await publication.PublishAsync(new GeneratedFileName("Greeting", ".txt"), CancellationToken.None);
Console.WriteLine(path); // Greeting.txt, Greeting (2).txt, ...; existing files are preserved.
Disposal removes abandoned staging; a published file survives disposal. PublishExactAsync supports
an exact filename and explicitly authorized replacement. Publication requires a native rename and
does not fall back to cross-volume copying. Atomic visibility does not guarantee survival of a power
failure. See the publication recipes for streaming, snapshot replacement, and
ownership.
Documentation and support
- Integration guide: composition, capability recipes, and operation contracts.
- Platform support: deployment prerequisites, configuration, and tested environments.
- Changelog and releases: history and published artifacts.
- Native validation: automated evidence, limitations, and manual desktop checks.
- Architecture: capability boundaries and resource ownership.
- Contributing and releasing: source development and publication.
- GitHub Issues: search existing reports, or open an issue for a bug, capability request, or integration question.
The README and guides describe the source revision being viewed. Use the matching source tag or shipped XML documentation for an older installed package. Package README links point to their release snapshot. Stable public API contracts cover callers and implementers within a major version; new capabilities are optional, and breaking contract changes require a new major version.
For source development, install the SDK pinned in global.json and Node.js with npm as described in
Contributing, then run task check. Task is optional; equivalent commands are
listed there.
Copyright © 2026 Bathos Pty Ltd.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Bathos.Platform (>= 1.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.0 | 210 | 11/9/2026 |
| 1.2.0-rc.1 | 57 | 11/9/2026 |
| 1.2.0-beta.1 | 58 | 11/9/2026 |
| 1.1.0 | 250 | 10/25/2026 |
| 1.1.0-rc.1 | 73 | 10/25/2026 |
| 1.1.0-beta.2 | 74 | 10/25/2026 |
| 1.1.0-beta.1 | 69 | 10/24/2026 |
| 1.0.0 | 214 | 10/23/2026 |
| 0.1.0-beta.1 | 77 | 10/22/2026 |