| |
| |
| |
| # PseudoFile.readOnly constructor |
| |
| |
| |
| |
| *[<Null safety>](https://dart.dev/null-safety)* |
| |
| |
| |
| PseudoFile.readOnly([ReadFn](../../package-fuchsia_vfs_vfs/ReadFn.md)? _readFn) |
| |
| |
| <p>Creates a new read-only <a href="../../package-fuchsia_vfs_vfs/PseudoFile-class.md">PseudoFile</a> backed by the specified read handler.</p> |
| <p>The handler is called every time a read operation is performed on the file. It is only allowed |
| to read at offset 0, and all of the content returned by the handler is returned by the read |
| operation. Subsequent reads act the same - there is no seek position, nor ability to read |
| content in chunks.</p> |
| |
| |
| |
| ## Implementation |
| |
| ```dart |
| PseudoFile.readOnly(this._readFn) |
| : _capacity = 0, |
| assert(_readFn != null); |
| ``` |
| |
| |
| |
| |
| |
| |
| |