open function

int open(
  1. String path,
  2. int flags,
  3. int mode
)

Implementation

int open(String path, int flags, int mode) {
  final cPath = path.toNativeUtf8(allocator: malloc);
  final result = _open(cPath, flags, mode);
  malloc.free(cPath);

  if (result < 0) {
    throw Exception('open : ${lastError()} : $path');
  }
  return result;
}