PeanutButter
Loading...
Searching...
No Matches
PeanutButter.Utils.AutoResettingFile Class Reference

Facilitates easily reverting a file to a prior state via the IDisposable pattern. More...

Inheritance diagram for PeanutButter.Utils.AutoResettingFile:

Public Member Functions

 AutoResettingFile (string path)
 Create a new AutoResettingFile for the provided path using automatic storage.
 AutoResettingFile (string path, StorageTypes storageType)
 Create a new AutoResettingFile for the provided path using the requested storage.
void Dispose ()
 Reverts the file back to its original state.

Static Public Attributes

static readonly int MaxInMemoryFileSizeInBytes = 1024 * 1024 * 10
 The max file size to store in memory when using Automatic storage You may modify this at runtime, but it defaults to 10mb.

Detailed Description

Facilitates easily reverting a file to a prior state via the IDisposable pattern.

Constructor & Destructor Documentation

◆ AutoResettingFile() [1/2]

PeanutButter.Utils.AutoResettingFile.AutoResettingFile ( string path)

Create a new AutoResettingFile for the provided path using automatic storage.

Parameters
path

◆ AutoResettingFile() [2/2]

PeanutButter.Utils.AutoResettingFile.AutoResettingFile ( string path,
StorageTypes storageType )

Create a new AutoResettingFile for the provided path using the requested storage.

Parameters
path
storageType

The documentation for this class was generated from the following file:
  • source/Utils/PeanutButter.Utils/AutoResettingFile.cs