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