Channel.fromFile(String path)
Gets a Channel for accessing the file at path
.
The returned Channel supports read-only fdio operations on the file.
Implementation
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);
}