TemporaryDirectory 0.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package TemporaryDirectory --version 0.0.1
                    
NuGet\Install-Package TemporaryDirectory -Version 0.0.1
                    
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="TemporaryDirectory" Version="0.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TemporaryDirectory" Version="0.0.1" />
                    
Directory.Packages.props
<PackageReference Include="TemporaryDirectory" />
                    
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 TemporaryDirectory --version 0.0.1
                    
#r "nuget: TemporaryDirectory, 0.0.1"
                    
#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 TemporaryDirectory@0.0.1
                    
#: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=TemporaryDirectory&version=0.0.1
                    
Install as a Cake Addin
#tool nuget:?package=TemporaryDirectory&version=0.0.1
                    
Install as a Cake Tool

<h1 align="center">Temporary Directory .Net Core</h1>

<p align="center">⚡ Working with temporary directory made easy ☕️</p>

**Temporary Directory ** is a simple to work with temporary directory for .Net Core developers.

🔧 Installation

Using the .NET Core command-line interface (CLI) tools:

$ dotnet add package XXX

or with the Package Manager Console:

$ Install-Package XXX

🚀 Usage

Creating temporary directory

To create a temporary directory at the system temporary directory call the create method:

TemporaryDirectoryHandler directory = new TemporaryDirectoryHandler().Create();

Naming temporary directory

To create a temporary directory with a specific name:

TemporaryDirectoryHandler directory = new TemporaryDirectoryHandler().SetName("MyFolder").Create();

Force creating temporary directory

In case the directory already exists you can force create the directory. It will delete the old folder and create the directory againg:

TemporaryDirectoryHandler directory = new TemporaryDirectoryHandler().SetName("MyFolder").SetForce(true).Create();

Creating temporary directory a custom location

If you wise to create the folder at another location you can specify this in the constructor:

TemporaryDirectoryHandler directory = new TemporaryDirectoryHandler(location).Create();

Retrive the path of the temporary directory

You can use the method GetPath to either get the path of the directory or a specific file:

TemporaryDirectoryHandler directory = new TemporaryDirectoryHandler().Create();
string path = directory.GetPath();
TemporaryDirectoryHandler directory = new TemporaryDirectoryHandler().Create();
string path = directory.GetPath("my-file.txt");

Empty temporary directory

You can empty a directory with method Empty:

TemporaryDirectoryHandler directory = new TemporaryDirectoryHandler().Create();
directory.Empty();

Delete temporary directory

You can delete a directory with method Empty:

TemporaryDirectoryHandler directory = new TemporaryDirectoryHandler().Create();
bool result = directory.Delete();

🤼 How to Contribute

Feel free to contribute with pull requests, bug reports or enhancement suggestions. We love PR's

🎉 Credits

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  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.  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.
  • net5.0

    • No dependencies.

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.0.0 1,945 2/23/2021
0.0.1 483 2/23/2021