DotNetOpen.FileService.Abstractions
3.0.0
dotnet add package DotNetOpen.FileService.Abstractions --version 3.0.0
NuGet\Install-Package DotNetOpen.FileService.Abstractions -Version 3.0.0
<PackageReference Include="DotNetOpen.FileService.Abstractions" Version="3.0.0" />
paket add DotNetOpen.FileService.Abstractions --version 3.0.0
#r "nuget: DotNetOpen.FileService.Abstractions, 3.0.0"
// Install DotNetOpen.FileService.Abstractions as a Cake Addin #addin nuget:?package=DotNetOpen.FileService.Abstractions&version=3.0.0 // Install DotNetOpen.FileService.Abstractions as a Cake Tool #tool nuget:?package=DotNetOpen.FileService.Abstractions&version=3.0.0
DotNetOpen.FileService
A library to manage files in an organized, efficient and simple manner.
Classes
FileService
<p>The default <a href="https://github.com/DaniAsh551/DotNetOpen/blob/master/FileService/DotNetOpen.FileService.Abstractions/Interfaces/IFileService.cs">IFileService</a> implementation which is provided. Requires an instance of <a href="https://github.com/DaniAsh551/DotNetOpen/blob/master/FileService/DotNetOpen.FileService.Abstractions/Interfaces/IFileServiceConfig.cs">IFileServiceConfig</a> in order to work.</p>
FileServiceConfig
<p>The default <a href="https://github.com/DaniAsh551/DotNetOpen/blob/master/FileService/DotNetOpen.FileService.Abstractions/Interfaces/IFileServiceConfig.cs">IFileServiceConfig</a> implementation provided.
FileMetaData
<p>The default <a href="https://github.com/DaniAsh551/DotNetOpen/blob/master/FileService/DotNetOpen.FileService.Abstractions/Interfaces/IFileMetaData.cs">IFileMetaData</a> implementation provided.
Enums
FileSizeUnit
<p>This Enum is not actually physically included in this package, but is rather inherited from the <a href="https://github.com/DaniAsh551/DotNetOpen/tree/master/FileService/DotNetOpen.FileService.Abstractions">DotNetOpen.FileService.Abstractions</a> and defines the units of size used throughout the whole package.
HOWTO
<p>In order to use the functionalities provided within the library, you must create or load an instance of IFileServiceConfig</p>
<pre><code class='language-cs'> var allowedExtensions = new string[] {"zip", "mp3", "png", "jpg", "gif"}; var config = new FileServiceConfig( stream ⇒ "application/octet-stream", 28, FileSizeUnit.MB, Path.Combine(Environment.CurrentDirectory, "Files"), allowedExtensions); var fileService = new FileService(config); </code></pre>
<p>Now, imagining that you have a zip file in a stream named 'stream' in order to save a stream into a file</p> <pre><code class='language-cs'> var fileMetaData = await fileService.CreateAsync("thefile.zip", "zip", stream); </code></pre>
<p>This gives you a variable of type 'IFileMetaData' which contains the basic information of the file which we just saved.</p> <p>Now imagining that you want to get the data of the newly created file into a stream named 'strm'</p> <pre><code class='language-cs'> var metaData = fileService.GetFile("thefile.zip", "zip"); </code></pre>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DotNetOpen.FileService.Abstractions:
Package | Downloads |
---|---|
DotNetOpen.FileService
A library to manage files in an organized, efficient and simple manner. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Changelog v1.0.1
- Added new async methods
- Fixed FileSizeUnit calculation bug
- Create and Update now supports Streams
Changelog v2.0.0
- Fixed critical namespace issues
- Fixed unnecessary exception throwing
Changelog v3.0.0
- Fixed some more filesize related bugs
- Added rules, now custom rules for file acception can be added in the config