NanoByte.Common
Public Member Functions | List of all members
NanoByte.Common.Storage.AtomicRead Class Reference

Ensures that a read operation for a file does not occur while an

See also
AtomicWrite

for the same file is in progress. More...

Inheritance diagram for NanoByte.Common.Storage.AtomicRead:

Public Member Functions

 AtomicRead ([Localizable(false)] string path)
 Prepares an atomic read operation. More...
 
void Dispose ()
 

Detailed Description

Ensures that a read operation for a file does not occur while an

See also
AtomicWrite

for the same file is in progress.

using (new AtomicRead(filePath))
return File.ReadAllBytes(filePath);

Constructor & Destructor Documentation

◆ AtomicRead()

NanoByte.Common.Storage.AtomicRead.AtomicRead ( [Localizable(false)] string  path)
inline

Prepares an atomic read operation.

Parameters
pathThe path of the file that will be read.

The documentation for this class was generated from the following file:
NanoByte.Common.Storage.AtomicRead.AtomicRead
AtomicRead([Localizable(false)] string path)
Prepares an atomic read operation.
Definition: AtomicRead.cs:24