blob: 09b58dadcaf6231a4d29dfacb8f6777e387ed52f [file] [log] [blame] [view] [edit]
# SizedVmo.fromFile constructor
SizedVmo.fromFile(String path)
<p>Uses fdio_get_vmo_clone() to get a VMO for the file at <code>path</code> in the
current Isolate's namespace.</p>
<p>The returned Vmo is read-only.</p>
## Implementation
```dart
factory SizedVmo.fromFile(String path) {
FromFileResult r = System.vmoFromFile(path);
if (r.status != ZX.OK) {
throw ZxStatusException(r.status, getStringForStatus(r.status));
}
return SizedVmo(r.handle, r.numBytes);
}
```