C# Class Amazon.Runtime.Internal.Util.OptimisticLockedTextFile

Provides line-based read/write access to a file. The file can be read into memory, changed, then written back to disk. When the file is persisted back to disk, an optimistic concurrency check is performed to make sure the file hasn't changed since it was originally read. This class is not threadsafe.
Show file Open project: aws/aws-sdk-net Class Usage Examples

Private Properties

Property Type Description
HasEnding bool
Read void
ReadLinesWithEndings List

Public Methods

Method Description
OptimisticLockedTextFile ( string filePath ) : System

Construct a new OptimisticLockedTextFile.

Persist ( ) : void

Persist changes to disk after an optimistic concurrency check is completed.

ToString ( ) : string

Private Methods

Method Description
HasEnding ( string line ) : bool
Read ( ) : void
ReadLinesWithEndings ( string str ) : List

Method Details

OptimisticLockedTextFile() public method

Construct a new OptimisticLockedTextFile.
public OptimisticLockedTextFile ( string filePath ) : System
filePath string path of the file
return System

Persist() public method

Persist changes to disk after an optimistic concurrency check is completed.
public Persist ( ) : void
return void

ToString() public method

public ToString ( ) : string
return string