NanoByte.Common
Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | List of all members
NanoByte.Common.Storage.TemporaryDirectory Class Reference

Disposable class to create a temporary directory and delete it again when disposed. More...

Inheritance diagram for NanoByte.Common.Storage.TemporaryDirectory:
NanoByte.Common.Storage.LocationsRedirect NanoByte.Common.Storage.TemporaryFlagFile NanoByte.Common.Storage.TemporaryWorkingDirectory

Public Member Functions

 TemporaryDirectory ([Localizable(false)] string prefix)
 Creates a uniquely named, empty temporary directory on disk. More...
 
void Dispose ()
 Deletes the temporary directory. More...
 

Static Public Member Functions

static implicit operator string (TemporaryDirectory dir)
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Properties

string Path [get]
 The fully qualified path of the temporary directory. More...
 

Detailed Description

Disposable class to create a temporary directory and delete it again when disposed.

Constructor & Destructor Documentation

◆ TemporaryDirectory()

NanoByte.Common.Storage.TemporaryDirectory.TemporaryDirectory ( [Localizable(false)] string  prefix)
inline

Creates a uniquely named, empty temporary directory on disk.

Parameters
prefixA short string the directory name should start with.
Exceptions
IOExceptionA problem occurred while creating a directory in System.IO.Path.GetTempPath.
UnauthorizedAccessExceptionCreating a directory in System.IO.Path.GetTempPath is not permitted.

Member Function Documentation

◆ Dispose()

void NanoByte.Common.Storage.TemporaryDirectory.Dispose ( )
inline

Deletes the temporary directory.

Property Documentation

◆ Path

string NanoByte.Common.Storage.TemporaryDirectory.Path
get

The fully qualified path of the temporary directory.


The documentation for this class was generated from the following file: