NanoByte.Common  2.9.0
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...
 
virtual void Dispose ()
 Deletes the temporary directory. More...
 

Static Public Member Functions

static implicit operator string (TemporaryDirectory dir)
 

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()

virtual void NanoByte.Common.Storage.TemporaryDirectory.Dispose ( )
inlinevirtual

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: