OsLibCore 4.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package OsLibCore --version 4.1.0
                    
NuGet\Install-Package OsLibCore -Version 4.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OsLibCore" Version="4.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OsLibCore" Version="4.1.0" />
                    
Directory.Packages.props
<PackageReference Include="OsLibCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OsLibCore --version 4.1.0
                    
#r "nuget: OsLibCore, 4.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OsLibCore@4.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OsLibCore&version=4.1.0
                    
Install as a Cake Addin
#tool nuget:?package=OsLibCore&version=4.1.0
                    
Install as a Cake Tool

OsLib

Handling of files, paths, temp/backup directories, and system calls.

OsLib change requests and release notes are centralized in the RAIkeep doc/ directory under OsLib_... filenames; they are not stored separately in this child repository.

formerly OsLibCore

4.1.0

  • Current prepared release line for OsLibCore is 4.1.0.
  • Os.TempDir remains sourced from immutable runtime configuration and is now validated once at first Os initialization with an OsLib TmpFile write/remove probe.
  • Startup fails fast when the configured temp directory is not writable; Os.Config is neither mutated nor bypassed with a fallback.
  • RaiPathException and RaiPathNotFoundException provide path-specific failures.
  • RaiFile.WriteFromAsync(IAsyncEnumerable<byte[]>, CancellationToken) provides stream-free chunk ingestion.
  • TextFile.SaveInPlace() writes a small coordination file without a preceding delete or rename, while retaining cloud materialization checks.
  • Configured cloud-path classification recognizes Dropbox, OneDrive, GoogleDrive, and ICloudDrive roots.
  • The RaiFile.mkdir() virtual dispatch, UTC timestamp handling, and async RaiFile APIs remain current.
  • See OsLib_RELEASE_NOTES_4.1.0.md for details.

namespace

OsLib

classes

<details> <summary>RaiSystem: Run external processes with structured output capture.</summary>

  • RaiSystem: Exec, ExecResult, Start, CreateScript </details>

<details> <summary>Script: Executable script file backed by TextFile and RaiSystem.</summary>

  • Script: create a script file from content, save/update it, and apply Unix executable mode automatically. </details>

<details> <summary>EscapeMode: Defines escape modes for path and parameter handling.</summary>

  • EscapeMode </details>

<details> <summary>OsType: Identifies the OS type.</summary>

  • OsType </details>

<details> <summary>Os: Platform helpers, immutable runtime config snapshot, diagnostics, and path normalization.</summary>

  • Os: UserHomeDir, AppRootDir, TempDir, LocalBackupDir, Config, IsConfigLoaded, ConfigFileFullName, DefaultConfigFileLocation, Escape, NormPath, NormSeperator </details>

<details> <summary>CloudPathWiring: Compatibility initializer for older callers.</summary>

  • CloudPathWiring: Initialize </details>

<details> <summary>RaiPath: Directory path type with buffered cloud classification.</summary>

  • RaiPath: Path, Cloud, / operator, Parent, mkdir, rmdir, mv, cp, backup, EnumerateFiles, EnumerateDirectories </details>

<details> <summary>RaiFile: File utility with cloud-aware wait behavior.</summary>

  • RaiFile: Exists, LastWriteTimeUtc, rm, mv, cp, mkdir, rmdir, WriteFromAsync, ReadAllBytesAsync, AwaitVanishing, AwaitMaterializing, BackdateCreationTime, DefaultSyncPropagationDelayMs, Zip, backup </details>

<details> <summary>RaiFileExtensions: Convenience extensions for string and CSV handling.</summary>

  • RaiFileExtensions: MakePolicyCompliant, Singularize, CreateDictionariesFromCsvLines </details>

<details> <summary>TextFile, CsvFile, TmpFile: Text/data-file helpers built on RaiFile.</summary>

  • TextFile: Read, Save, SaveInPlace, Append, Delete
  • CsvFile: Read, Objects, ToJsonFile
  • TmpFile: create </details>

<details> <summary>CanonicalPath, CanonicalFile, and path conventions: retained compatibility helpers.</summary>

  • CanonicalPath: deprecated legacy type retained for compatibility; prefer direct RaiPath composition.
  • PathConventionType / IPathConventionFile: convention-aware file contracts. </details>

<details> <summary>SshSystem and CLI wrappers: remote shell execution and typed command launchers.</summary>

  • SshSystem: ExecuteRemoteCommand, ExecuteScript, ReadRemoteConfigJson5
  • CliCommand: IsAvailable, TryResolveExecutable, Run, RunAsync, GetInstallCommand, GetUpdateCommand
  • Built-in wrappers: CurlCommand, ZipCommand, SevenZipCommand, RCloneCommand </details>

nuget

https://www.nuget.org/packages/OsLibCore/

diagram

  • Source: RaiFile-Hierarchy.puml
  • CLI render (if PlantUML is installed): plantuml RaiFile-Hierarchy.puml
  • VS Code: open the .puml file and use a PlantUML preview/render extension.

detailed api

  • Foldable class and method-level documentation: API.md
  • Current cloud configuration and buffered cloud-path behavior: CLOUD_STORAGE_DISCOVERY.md
  • Historical path/config/logging design note, now marked with 3.7.7 caveats: PATH_CONFIG_LOGGING_REFACTOR.md
  • CLI command hierarchy and external tool wrappers: ../CliCommand-Hierarchy.puml
  • Local backup placement: Os.LocalBackupDir is optional; when absent, backup features are disabled instead of falling back.
  • Structured logging: OsLib diagnostics use ILogger<T> templates. The current config path falls back to a baseline TempDir model rather than treating missing config as a startup-fatal public API contract.
  • Cloud config guidance: prefer explicit Cloud.* entries in RAIkeep.json5 when you want stable cloud-backed path classification.
  • Metadata propagation guidance: RaiFile.BackdateCreationTime(...) uses SyncPropagationDelayMs from config when no explicit delay is passed.
  • Script helper: use RaiSystem.CreateScript(path, name, content) or new Script(path, name, content) when tests or tools need an executable script file.

unit tests

  • Local unit tests are in OsLib.Tests.
  • Run from repository root: dotnet test OsLib/OsLib.Tests/OsLib.Tests.csproj --nologo -v minimal

release notes

nuget publish automation

  • GitHub Actions workflow: .github/workflows/publish-nuget.yml
  • Trigger: push a version tag in format v* (example: v3.8.0)
  • Safety check: workflow validates tag version equals <Version> in OsLib.csproj
  • Required GitHub repository secret: NUGET_API_KEY
  • Typical release command:
    • git tag -a v4.1.0 -m "v4.1.0" && git push origin v4.1.0
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on OsLibCore:

Package Downloads
JsonPit

Stores json files across servers (synchronized).

RaiImage

Managing image files with meaningful elements in the image name and path.

HDitem.Persist

Package Description

RaiDiagram

Agent-readable semantic diagrams, model reconciliation, and PlantUML rendering for RAIkeep.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.2.0 83 8/16/2026
4.1.0 148 8/13/2026
4.0.1 121 8/11/2026
4.0.0 170 8/6/2026
3.13.1 149 8/3/2026
3.11.4 177 7/11/2026
3.11.3 191 6/28/2026
3.11.2 137 6/28/2026
3.11.1 168 6/24/2026
3.10.2 199 6/18/2026
3.9.1 162 6/8/2026
3.9.0 154 6/6/2026
3.8.15 172 6/6/2026
3.8.14 136 6/6/2026
3.8.13 129 6/6/2026
3.8.12 175 6/6/2026
3.8.11 157 6/5/2026
3.8.7 136 5/16/2026
3.8.6 114 5/16/2026
3.8.5 119 5/16/2026
Loading failed

4.1.0 implements CR008: validated configured Os.TempDir, RaiPath domain exceptions, and async byte-chunk file ingestion.