Flow PHP

FileSplit implements Describable, Split

Read onlyYes
FinalYes

Interfaces

Describable
Split
Plain data that crosses a process boundary; source order is its position in splits().

Properties

$length  : null|int<1, max>
$path  : Path
$size  : null|int<0, max>
$start  : int<0, max>

Methods

__construct()  : mixed
bytes()  : int<0, max>
The on-disk bytes this split covers - what a launcher sizes its workers by; 0 when the kind cannot know.
describe()  : null|Description
fromDescription()  : static
isFirst()  : bool
owns()  : RowRange
window()  : RangeSourceStream
windows()  : array<int, self>

Properties

$length

public null|int<1, max> $length

on-disk bytes the window covers; null means "to the end of the file"

$size

public null|int<0, max> $size

the listed size of the whole file; a read with it never lists again, null lists as before

$start

public int<0, max> $start

on-disk byte where the window starts

Methods

__construct()

public __construct(Path $path, int $start, int|null $length[, int|null $size = null ]) : mixed
Parameters
$path : Path
$start : int
$length : int|null
$size : int|null = null

bytes()

The on-disk bytes this split covers - what a launcher sizes its workers by; 0 when the kind cannot know.

public bytes() : int<0, max>
Return values
int<0, max>

describe()

public describe() : null|Description
Return values
null|Description —

null when this instance cannot cross a process boundary (a live client, a custom collaborator)

fromDescription()

public static fromDescription(array<string|int, mixed> $data, Rebuild $rebuild) : static
Parameters
$data : array<string|int, mixed>
$rebuild : Rebuild
Return values
static

isFirst()

public isFirst() : bool
Return values
bool

window()

public window(SourceStream $stream, null|int<0, max> $start, null|int<0, max> $end) : RangeSourceStream
Parameters
$stream : SourceStream
$start : null|int<0, max>
$end : null|int<0, max>
Return values
RangeSourceStream

windows()

public static windows(SourceFile $file, int<1, max> $targetBytes) : array<int, self>
Parameters
$file : SourceFile
$targetBytes : int<1, max>
Return values
array<int, self>
On this page

Search results