Class FileStreamProvider
- Namespace
- CarinaStudio.IO
- Assembly
- CarinaStudio.AppBase.Core.dll
Implementation of IStreamProvider based-on file.
public class FileStreamProvider : IStreamProvider
- Inheritance
-
FileStreamProvider
- Implements
- Inherited Members
- Extension Methods
Constructors
FileStreamProvider(string, bool)
Initialize new FileStreamProvider instance.
public FileStreamProvider(string fileName, bool append = false)
Parameters
Properties
FileName
Get file name.
public string FileName { get; }
Property Value
Methods
CheckStreamAccess(StreamAccess)
Check whether given access to Stream is supported by this provider or not.
public bool CheckStreamAccess(StreamAccess access)
Parameters
accessStreamAccessAccess to stream.
Returns
- bool
True if given combination of access is supported.
OpenStreamAsync(StreamAccess, CancellationToken)
Open stream asynchronously.
public Task<Stream> OpenStreamAsync(StreamAccess access, CancellationToken token)
Parameters
accessStreamAccessDesired access to stream.
tokenCancellationTokenCancellation token.