Cloud.File.Storage.Manager.Common 3.1.0

dotnet add package Cloud.File.Storage.Manager.Common --version 3.1.0
                    
NuGet\Install-Package Cloud.File.Storage.Manager.Common -Version 3.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="Cloud.File.Storage.Manager.Common" Version="3.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cloud.File.Storage.Manager.Common" Version="3.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Cloud.File.Storage.Manager.Common" />
                    
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 Cloud.File.Storage.Manager.Common --version 3.1.0
                    
#r "nuget: Cloud.File.Storage.Manager.Common, 3.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 Cloud.File.Storage.Manager.Common@3.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=Cloud.File.Storage.Manager.Common&version=3.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Cloud.File.Storage.Manager.Common&version=3.1.0
                    
Install as a Cake Tool

Cloud File Storage Manager

It is the common basis of file manager nuget packages that provides definitions for various file operations, on which any package can be built. Provides complete implementation to handle easily cloud file storage operations like get informations about files, reading, downloadURL generation, file update, file move and delete.

Path rules

Every path is relative to the root directory of the storage. Paths can be given as a single string or as segments, and every segment is split on / and \ and checked before any storage call:

  • Empty or whitespace segments, segments made only of dots and spaces (such as ..) and segments with control characters are rejected with an ArgumentException.
  • The same checks run on the percent-decoded forms of a segment, so encoded traversal such as %2e%2e is rejected too. A segment whose decoded form contains / or \ is rejected.
  • A storage package can add its own segment rules on top of these.

Root protection

The root directory itself cannot be changed: deleting it, updating it, moving it or opening a writeable local stream on it throws an InvalidOperationException. Reading it as a file or asking a download URL for it throws an ArgumentException. Asking file information for the root returns a non-existing entry.

Other behaviour

  • Moving a file to its own path does nothing.
  • File information objects returned by the storage can be passed back to the read, download URL, update, move and delete methods; they always resolve under the root directory.
  • SupportsDownloadUrl tells whether the storage can generate download URLs. When it is false (Physical), the download URL methods throw a NotSupportedException.
  • A writeable local stream is uploaded when it is disposed, also after an exception, so partially written content is uploaded. A stream can only be committed by the storage that created it, and only to a path under its root.
  • ToJson serializes the storage options, including keys, passwords and tokens, so its output must never be logged.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (7)

Showing the top 5 NuGet packages that depend on Cloud.File.Storage.Manager.Common:

Package Downloads
Cloud.File.Storage.Manager.AzureBlob

Provides complete implementation to handle easily cloud file storage operations for Azure Blob Storage like get informations about files, reading, downloadURL generation, file update, file move and delete.

Cloud.File.Storage.Manager.SharePoint

Provides complete implementation to handle easily cloud file storage operations for SharePoint like get informations about files, reading, downloadURL generation, file update, file move and delete.

Cloud.File.Storage.Manager.Minio

Provides complete implementation to handle easily cloud file storage operations for Minio .NET SDK for Amazon S3 Compatible Cloud Storage like get informations about files, reading, downloadURL generation, file update, file move and delete.

Cloud.File.Storage.Manager.Physical

Provides complete implementation to handle easily cloud file storage operations for Physical Storage like get informations about files, reading, downloadURL generation, file update, file move and delete.

Cloud.File.Storage.Manager.AmazonS3

Provides complete implementation to handle easily cloud file storage operations for Amazon S3 like get informations about files, reading, downloadURL generation, file update, file move and delete.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.1.0 176 10/10/2026
3.0.0 738 2/5/2024
2.0.0 518 5/19/2023
1.0.0 455 5/22/2022

- Path segments are validated: empty, dot-only, control-character and percent-encoded traversal segments are rejected
- The storage root cannot be deleted, moved, overwritten or read as a file
- IFileInfo based move and download URL overloads respect the configured root directory
- Local file streams upload only to the target they were created for
- SupportsDownloadUrl tells whether a provider can issue download links
- Moving an entry onto itself is a no-op