# 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); | |
} | |
``` | |