callbackFromNative function

int callbackFromNative(
  1. int op,
  2. Pointer<Utf8> path
)

Implementation

int callbackFromNative(int op, ffi.Pointer<Utf8> path) {
  final dartPath = Utf8.fromUtf8(path);
  print('Dart received: [$op] $dartPath from native');
  final operation = FuseOp.values[op];
  switch (operation) {
    case FuseOp.GetAttr:
      DartFuse().getAttributes.call(dartPath);
      break;
    case FuseOp.Open:
      // TODO: Handle this case.
      break;
    case FuseOp.Read:
      // TODO: Handle this case.
      break;
    case FuseOp.ReadDir:
      // TODO: Handle this case.
      break;
  }
  return 1;
}