CCSWE.nanoFramework.FileStorage
1.1.117
dotnet add package CCSWE.nanoFramework.FileStorage --version 1.1.117
NuGet\Install-Package CCSWE.nanoFramework.FileStorage -Version 1.1.117
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="CCSWE.nanoFramework.FileStorage" Version="1.1.117" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CCSWE.nanoFramework.FileStorage" Version="1.1.117" />
<PackageReference Include="CCSWE.nanoFramework.FileStorage" />
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 CCSWE.nanoFramework.FileStorage --version 1.1.117
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CCSWE.nanoFramework.FileStorage, 1.1.117"
#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 CCSWE.nanoFramework.FileStorage@1.1.117
#: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=CCSWE.nanoFramework.FileStorage&version=1.1.117
#tool nuget:?package=CCSWE.nanoFramework.FileStorage&version=1.1.117
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CCSWE.nanoFramework.FileStorage
An IFileStorage abstraction over the device file system, making storage access testable and swappable across different storage backends.
API
IFileStorage
| Method | Description |
|---|---|
Create(string path) |
Creates or overwrites a file and returns a FileStream |
Delete(string path) |
Deletes a file |
Exists(string path) |
Returns true if the file exists |
GetDirectories(string path) |
Lists subdirectories under the given path |
GetFiles(string path) |
Lists files in the given directory |
OpenRead(string path) |
Opens an existing file for reading |
OpenText(string path) |
Opens an existing file as a StreamReader |
OpenWrite(string path) |
Opens or creates a file for writing |
ReadAllBytes(string path) |
Reads the entire file as a byte[] |
ReadAllText(string path) |
Reads the entire file as a string |
WriteAllBytes(string path, byte[] bytes) |
Writes a byte[] to a file, replacing any existing content |
WriteAllText(string path, string text) |
Writes a string to a file, replacing any existing content |
DI Registration
services.AddFileStorage();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NETnanoFramework | netnano1.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- nanoFramework.CoreLibrary (>= 1.17.11)
- nanoFramework.DependencyInjection (>= 1.1.32)
- nanoFramework.Runtime.Events (>= 1.11.32)
- nanoFramework.System.IO.FileSystem (>= 1.1.87)
- nanoFramework.System.IO.Streams (>= 1.1.96)
- nanoFramework.System.Text (>= 1.3.42)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.