PiBox.Plugins.Persistence.Smb
1.3.2
dotnet add package PiBox.Plugins.Persistence.Smb --version 1.3.2
NuGet\Install-Package PiBox.Plugins.Persistence.Smb -Version 1.3.2
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="PiBox.Plugins.Persistence.Smb" Version="1.3.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PiBox.Plugins.Persistence.Smb" Version="1.3.2" />
<PackageReference Include="PiBox.Plugins.Persistence.Smb" />
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 PiBox.Plugins.Persistence.Smb --version 1.3.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PiBox.Plugins.Persistence.Smb, 1.3.2"
#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 PiBox.Plugins.Persistence.Smb@1.3.2
#: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=PiBox.Plugins.Persistence.Smb&version=1.3.2
#tool nuget:?package=PiBox.Plugins.Persistence.Smb&version=1.3.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
PiBox.Plugins.Persistence.Smb
PiBox.Plugins.Persistence.Smb is a plugin that allows other pibox components to do interact witha Smb compatible storage.
Installation
To install the nuget package follow these steps:
dotnet add package PiBox.Plugins.Persistence.Smb
or add as package reference to your .csproj
<PackageReference Include="PiBox.Plugins.Persistence.Smb" Version="" />
Appsettings.yml
Configure your appsettings.yml with these properties
smb:
server: example.com
domain: mydomain.com
defaultShare: myshare
driveMappings:
- drive: 'J:'
share: myshare
shareMappings:
- folder: myfolder
share: myshare
Usage
public class ExampleService
{
private readonly ISmbStorage _smbStorage;
// retrieve the registered service ISmbStorage from the DI container via depentency injection
public ExampleService(ISmbStorage smbStorage)
{
_smbStorage = smbStorage;
}
// ensure a file exist in the smb storage
public async Task EnsurePathAsync()
{
await _fileStorage.EnsurePathAsync("folder/subfolder/", cancellationToken);
}
// delete a file from the smb storage
public async Task DeleteIfExists()
{
await _fileStorage.DeleteIfExists("folder/myfile.txt", cancellationToken);
}
// write a byte array as file content to the smb storage
public async Task WriteAsync()
{
await _fileStorage.WriteAsync("folder/myfile.txt", new byte[0], cancellationToken);
}
// write a string as file content to the smb storage
public async Task WriteStringAsync()
{
await _fileStorage.WriteStringAsync("folder/myfile.txt", "hello world", cancellationToken);
}
// write a stream as file content to the smb storage
public async Task WriteStreamAsync()
{
await _fileStorage.WriteStringAsync("folder/myfile.txt", new MemoryStream(), cancellationToken);
}
// read a file form smb storage and return content as string
public async Task ReadStringAsync()
{
string content = await ReadStreamAsync("folder/myfile.txt", cancellationToken);
}
// read a file form smb storage and return content as byte array
public async Task ReadBytesAsync()
{
bytes[] stream = await ReadStreamAsync("folder/myfile.txt", cancellationToken);
}
}
| Product | Versions 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.
-
net8.0
- EzSmb (>= 1.3.10)
- PiBox.Plugins.Persistence.Abstractions (>= 1.3.2)
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.3.2 | 255 | 4/4/2025 |
| 1.2.2 | 566 | 3/26/2025 |
| 1.1.8 | 214 | 2/3/2025 |
| 1.1.6 | 210 | 2/3/2025 |
| 1.0.91 | 182 | 1/24/2025 |
| 1.0.85 | 188 | 1/15/2025 |
| 1.0.79 | 210 | 12/20/2024 |
| 1.0.73 | 180 | 10/22/2024 |
| 1.0.66 | 205 | 10/15/2024 |
| 1.0.64 | 187 | 10/14/2024 |
| 1.0.61 | 222 | 10/1/2024 |
| 1.0.60 | 213 | 9/27/2024 |
| 1.0.54 | 231 | 4/30/2024 |
| 1.0.51 | 246 | 2/27/2024 |
| 1.0.49 | 230 | 2/27/2024 |
| 1.0.47 | 243 | 2/21/2024 |
| 1.0.45 | 244 | 2/20/2024 |
| 1.0.43 | 229 | 2/13/2024 |
| 1.0.41 | 236 | 2/13/2024 |
| 1.0.39 | 249 | 2/8/2024 |
Loading failed