IFileStream Interface
NuGet: GHIElectronics.TinyCLR.IO
Assembly: GHIElectronics.TinyCLR.IO
Namespace: GHIElectronics.TinyCLR.IO
A low-level file stream supplied by a drive provider.
public interface IFileStream
Properties
CanWrite
bool CanWrite { get; }
Whether the stream supports writing.
CanRead
bool CanRead { get; }
Whether the stream supports reading.
CanSeek
bool CanSeek { get; }
Whether the stream supports seeking.
Length
long Length { get; set; }
The length of the stream in bytes.
Methods
Read(byte[] buffer, int offset, int count, TimeSpan timeout)
int Read(byte[] buffer, int offset, int count, TimeSpan timeout)
Reads up to count bytes into the buffer, returning the number read.
Returns int
Write(byte[] buffer, int offset, int count, TimeSpan timeout)
int Write(byte[] buffer, int offset, int count, TimeSpan timeout)
Writes count bytes from the buffer, returning the number written.
Returns int
Seek(long offset, SeekOrigin origin)
long Seek(long offset, SeekOrigin origin)
Moves the stream position relative to the given origin and returns the new position.
Returns long
Flush()
void Flush()
Flushes any buffered data to the underlying store.
Close()
void Close()
Closes the stream.