DotNetOpen.FileService 3.0.0

Install-Package DotNetOpen.FileService -Version 3.0.0
dotnet add package DotNetOpen.FileService --version 3.0.0
<PackageReference Include="DotNetOpen.FileService" Version="3.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotNetOpen.FileService --version 3.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DotNetOpen.FileService, 3.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install DotNetOpen.FileService as a Cake Addin
#addin nuget:?package=DotNetOpen.FileService&version=3.0.0

// Install DotNetOpen.FileService as a Cake Tool
#tool nuget:?package=DotNetOpen.FileService&version=3.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


A library to manage files in an organized, efficient and simple manner.



<p>The default <a href="">IFileService</a> implementation which is provided. Requires an instance of <a href="">IFileServiceConfig</a> in order to work.</p>


<p>The default <a href="">IFileServiceConfig</a> implementation provided.


<p>The default <a href="">IFileMetaData</a> implementation provided.



<p>This Enum is not actually physically included in this package, but is rather inherited from the <a href="">DotNetOpen.FileService.Abstractions</a> and defines the units of size used throughout the whole package.


<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("", "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("", "zip"); </code></pre>

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
3.0.0 364 3/7/2019
2.0.0 285 3/6/2019
1.0.0 352 2/19/2019

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