RawPFile.ofFile constructor
RawPFile.ofFile(
- String? path,
- PFileToByteStream _readStreamFactory,
- int? _size, {
- SafeCompleter? completer,
This constructor is more low-level because we can't pull in any file dependencies into this code
Implementation
RawPFile.ofFile(
this.path,
this._readStreamFactory,
this._size, {
SafeCompleter? completer,
}) : _read = SafeCompleter.stopped(),
name = path!.split("/").last {
if (completer != null) {
_read.start();
completer.future.whenComplete(() {
_read.complete(this);
});
}
}