blob: e36a5725b0f8cec9f0486f5b1df2d3078050751a [file] [log] [blame] [view]
# Channel.fromFile constructor
Channel.fromFile(String path)
<p>Gets a Channel for accessing the file at <code>path</code>.</p>
<p>The returned Channel supports read-only fdio operations on the file.</p>
## Implementation
```dart
factory Channel.fromFile(String path) {
HandleResult r = System.channelFromFile(path);
if (r.status != ZX.OK) {
throw ZxStatusException(r.status, getStringForStatus(r.status));
}
return Channel(r.handle);
}
```