OsLibCore 4.5.9

There is a newer version of this package available.
See the version list below for details.
dotnet add package OsLibCore --version 4.5.9
                    
NuGet\Install-Package OsLibCore -Version 4.5.9
                    
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.5.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OsLibCore" Version="4.5.9" />
                    
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.5.9
                    
#r "nuget: OsLibCore, 4.5.9"
                    
#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.5.9
                    
#: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.5.9
                    
Install as a Cake Addin
#tool nuget:?package=OsLibCore&version=4.5.9
                    
Install as a Cake Tool

OsLib

4.5.9

Coordinated 4.5.9 release; public behavior is aligned with the synchronized platform.

Latest release notes: OsLib 4.5.9 release notes.

Previous Versions

For release notes and changelogs of earlier releases, see the OsLib 4.x Release Notes.

Installation

.NET CLI

dotnet add package OsLibCore --version 4.5.9

PackageReference

<PackageReference Include="OsLibCore" Version="4.5.9" />

OsLib handles files, paths, temp and backup directories, and system calls. It was formerly named OsLibCore. Change requests and release notes are kept in the RAIkeep documentation archive.

namespace

OsLib

classes

RaiSystem: Run external processes with structured output capture.

  • RaiSystem: Exec, ExecResult, Start, CreateScript

Script: Executable script file backed by TextFile and RaiSystem.

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

EscapeMode: Defines escape modes for path and parameter handling.

  • EscapeMode

OsType: Identifies the OS type.

  • OsType

Os: Platform helpers, immutable runtime config snapshot, diagnostics, and path normalization.

  • Os: UserHomeDir, AppRootDir, TempDir, LocalBackupDir, Config, IsConfigLoaded, ConfigFileFullName, DefaultConfigFileLocation, Escape, NormPath, NormSeperator

CloudPathWiring: Compatibility initializer for older callers.

  • CloudPathWiring: Initialize

RaiPath: Directory path type with buffered cloud classification.

  • RaiPath: Path, Cloud, / operator, Parent, mkdir, rmdir, mv, cp, backup, EnumerateFiles, EnumerateDirectories
  • TempDir-to-cloud moves and replacement of existing cloud directories fail before mutation.

RaiFile: File utility with cloud-aware wait behavior.

  • RaiFile: Exists, LastWriteTimeUtc, rm, mv, cp, mkdir, rmdir, WriteFromAsync, ReadAllBytesAsync, AwaitVanishing, AwaitMaterializing, BackdateCreationTime, DefaultSyncPropagationDelayMs, Zip, backup
  • ReadAllBytesAsync preserves cancellation and wraps operating-system file I/O failures in RaiFileIOException, which retains IOException compatibility and exposes the affected FileName.
  • cp updates an existing cloud pathname in place; mv rejects TempDir-to-cloud relocation before mutation.
  • RaiCloudStorageException exposes Operation, SourcePath, and DestinationPath for prohibited cloud operations.

RaiZipFile: Immutable collection ZIP storage at the final pathname.

  • RaiZipFile: CreateImmutable, TryReadEntries
  • RaiZipEntry: Name, Content, FromFile, FromText
  • Existing same-name archives are reused only after complete filename/byte validation; different or corrupt archives are preserved and reported.
  • The parent must already exist. No TempDir staging, directory creation, extraction, or archive replacement occurs.

RaiFileExtensions: Convenience extensions for string and CSV handling.

  • RaiFileExtensions: MakePolicyCompliant, Singularize, CreateDictionariesFromCsvLines

TextFile, CsvFile, TmpFile: Text/data-file helpers built on RaiFile.

  • TextFile: Read, Save, SaveInPlace, Append, Delete
  • CsvFile: Read, Objects, ToJsonFile
  • TmpFile: create

CanonicalPath, CanonicalFile, and path conventions: retained compatibility helpers.

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

SshSystem and CLI wrappers: remote shell execution and typed command launchers.

  • SshSystem: ExecuteRemoteCommand, ExecuteScript, ReadRemoteConfigJson5
  • CliCommand: IsAvailable, TryResolveExecutable, tokenized/string Run and RunAsync, timeout-aware token execution, BuildPosixShellCommand, GetInstallCommand, GetUpdateCommand
  • RaiSystemResult: exact ArgumentList, StandardOutput, StandardError, ExitCode, Succeeded, and TimedOut process metadata
  • PitsCommand: BuildSeedArguments, BuildExportArguments, BuildAuditArguments, BuildDeletePropertyArguments, BuildDeleteItemArguments, typed sync/async command methods, CR047 PitsSeedRequest.RequireExisting, PitsMaintainRequest.ArchiveEvents, and ForManagedAssembly
  • IorgCommand: BuildOrganizeArguments, BuildCleanArguments, BuildListArguments, BuildMoveArguments, sync/async counterparts, IorgCommandOptions.Tenant, RootIsApplicationRoot, and ForManagedAssembly
  • Built-in wrappers: CurlCommand, ZipCommand, SevenZipCommand, RCloneCommand, PitsCommand, IorgCommand

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. TempDir initialization validates the configured path once and fails fast when its OsLib tempfile probe cannot write; it does not mutate or bypass Os.Config.
  • 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

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:
    • The coordinated release is started only through the umbrella scripts/release-chain.sh 4.5.9 command after RAI approval.
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
RaiImage

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

JsonPit

Stores json files across servers (synchronized).

RaiDiagram

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

HDitem.Persist

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.5.10 116 10/12/2026
4.5.9 108 10/12/2026
4.5.8 122 10/10/2026
4.5.7 89 10/10/2026
4.5.6 137 10/9/2026
4.5.5 141 10/7/2026
4.5.4 155 10/3/2026
4.5.3 163 10/3/2026
4.5.2 157 10/3/2026
4.5.0 143 10/3/2026
4.4.8 95 10/2/2026
4.4.6 151 10/2/2026
4.4.5 146 9/30/2026
4.4.4 149 9/29/2026
4.4.3 150 9/28/2026
4.4.2 155 9/27/2026
4.4.1 160 9/25/2026
4.4.0 157 9/24/2026
4.3.2 179 9/14/2026
4.3.1 156 9/13/2026
Loading failed

Coordinated 4.5.5 dependency line; runtime behavior is unchanged.