position property

int get position

Returns the current position in the file.

Returns

The current byte position in the file.

Example

final input = FileInputStream('data.bin');
try {
  await input.readFully(100);
  print('Current position: ${input.position}'); // 100
  
  await input.skip(50);
  print('Current position: ${input.position}'); // 150
} finally {
  await input.close();
}

Implementation

int get position => _position;