class · System.IO

FileStream

public class System.IO.FileStream : System.IO.Stream

A file read and written in ranges of bytes, at a position, through a buffer.

Kind
class
Namespace
System.IO
Assembly
System.Core
Access
public
Source file
Stream.ant

Inheritance

Base classes
Any Stream FileStream

Constructors

constructor FileStream(path: System.String<u8>, mode: System.IO.FileMode)
#
constructor FileStream(path: System.String<u8>, mode: System.IO.FileMode, access: System.IO.FileAccess)
#
constructor FileStream(path: System.String<u8>, mode: System.IO.FileMode, access: System.IO.FileAccess, bufferSize: i32)
#

Properties

property Name: System.String<u8>
#

read-only

The path it was opened with.

property CanRead: bool
#

read-only

property CanWrite: bool
#

read-only

property CanSeek: bool
#

read-only

property Length: i64
#

read-only

property Position: i64
#

Methods

method Read(buffer: u8[], offset: i32, count: i32) -> i32
#

override

method ReadByte() -> i32
#

override

method Write(buffer: u8[], offset: i32, count: i32) -> void
#

override

method WriteByte(value: u8) -> void
#

override

method Seek(offset: i64, origin: System.IO.SeekOrigin) -> i64
#

override

method Seek(offset: i64, origin: i32) -> i64
#

Moves to offset from the start (0), the position (1) or the end (2): the new position.

method Flush() -> void
#

override

method Close() -> void
#

override

Private and internal members (5)

field buffered: System.IO.BufferedStream
#

private

field path: System.String<u8>
#

private

field reads: bool
#

private

field writes: bool
#

private

static method OpenAt(path: u16[], mode: i64) -> i64
#

private static

Inherited members (12)

Source

FileStream as Larva HIR, decompiled from its Larva HIR.

System.IO.FileStream.hir
// A file read and written in ranges of bytes, at a position, through a buffer.
public class System.IO.FileStream : System.IO.Stream
{
    field buffered: System.IO.BufferedStream
    field path: System.String<u8>
    field reads: bool
    field writes: bool
    static method OpenAt(path: u16[], mode: i64) -> i64
    constructor FileStream(path: System.String<u8>, mode: System.IO.FileMode)
    constructor FileStream(path: System.String<u8>, mode: System.IO.FileMode, access: System.IO.FileAccess)
    constructor FileStream(path: System.String<u8>, mode: System.IO.FileMode, access: System.IO.FileAccess, bufferSize: i32)
    method Read(buffer: u8[], offset: i32, count: i32) -> i32
    method ReadByte() -> i32
    method Write(buffer: u8[], offset: i32, count: i32) -> void
    method WriteByte(value: u8) -> void
    method Seek(offset: i64, origin: System.IO.SeekOrigin) -> i64
    // Moves to `offset` from the start (0), the position (1) or the end (2): the new position.
    method Seek(offset: i64, origin: i32) -> i64
    method Flush() -> void
    method Close() -> void
    // The path it was opened with.
    property Name: System.String<u8>
    property CanRead: bool
    property CanWrite: bool
    property CanSeek: bool
    property Length: i64
    property Position: i64
}
Esc