C# Class RadioDld.TempFile

Handle generating temporary file names and guarantee that any files with those names will be cleaned up.
Inheritance: Database, IDisposable
Exibir arquivo Open project: ribbons/RadioDownloader

Public Methods

Method Description
Dispose ( ) : void

Delete the temporary file at the path given by FilePath. If the file is in use it will be cleaned up the next time a temporary file is created or deleted after it becomes free.

TempFile ( string fileExtension ) : System

Initializes a new instance of the TempFile class and generates a temporary file name with the specified extension.

Private Methods

Method Description
DeleteFiles ( ) : void
Dispose ( bool disposing ) : void
TempFile ( ) : System

Initializes static members of the TempFile class. Any file names still listed in the database are attempted to be deleted.

Method Details

Dispose() public method

Delete the temporary file at the path given by FilePath. If the file is in use it will be cleaned up the next time a temporary file is created or deleted after it becomes free.
public Dispose ( ) : void
return void

TempFile() public method

Initializes a new instance of the TempFile class and generates a temporary file name with the specified extension.
public TempFile ( string fileExtension ) : System
fileExtension string The extension of the file, not including a leading dot.
return System