# VmoFile.readOnly constructor | |
*[<Null safety>](https://dart.dev/null-safety)* | |
VmoFile.readOnly([Vmo](../../zircon/Vmo-class.md) _vmo, [VmoSharingMode](../../package-fuchsia_vfs_vfs/VmoSharingMode.md) _sharingMode) | |
<p>Constructor for read-only <a href="../../zircon/Vmo-class.md">Vmo</a></p> | |
## Implementation | |
```dart | |
VmoFile.readOnly(this._vmo, this._sharingMode) | |
: super.readOnly(() { | |
int size = _vmo.getSize().size; | |
return _vmo.read(size).bytesAsUint8List(); | |
}); | |
``` | |