Zymba Documentation
IO.FileStream
Text
object @IO.FileStream(@IO.Stream) {
MODE_CREATE;
MODE_TRUNCATE;
MODE_APPEND;
MODE_OVERWRITE;
construct(string $path, int $mode) {}
attemptLock(): bool {}
attemptLockShared(): bool {}
canLock(): bool {}
getSize(): int {}
lock(): $this {}
lockShared(): $this {}
pad(int $size, string $padding): int {}
selectLock(): object {}
sync(): bool {}
syncData(): bool {}
unlock(): $this {}
}
IO file stream prototype.
Prototype
Methods
Opens a stream to a file in a specific access mode (see MODE_* constants).
CODE
$this.construct(string $path, int $mode): void
Parameters
| Name | Type | Value | Default |
|---|---|---|---|
| path | string | "" | |
| mode | int | MODE_READ |
Synchonizes this stream with the underlying storage device, including modified metadata.
CODE
$this.sync(): bool
Returns
| Type | Value |
|---|---|
bool |
Synchonizes this stream with the underlying storage device, excluding modified metadata (if possible).
CODE
$this.syncData(): bool
Returns
| Type | Value |
|---|---|
bool |