startFileMonitoring method

  1. @override
Future<bool> startFileMonitoring()
override

开始监听文件系统事件 需要管理员权限

Implementation

@override
Future<bool> startFileMonitoring() async {
  try {
    final result = await methodChannel.invokeMethod<bool>(
      'startFileMonitoring',
    );
    return result ?? false;
  } catch (e) {
    debugPrint('Error starting file monitoring: $e');
    return false;
  }
}