registerOwner method

Future<void> registerOwner(
  1. String rootPath
)

Implementation

Future<void> registerOwner(String rootPath) async {
  final ownersDir = io.Directory(p.join(packageDir(rootPath), "owners"));
  await ownersDir.create(recursive: true);

  final ownerFile = io.File(p.join(ownersDir.path, "$_ownerPid.owner"));
  await ownerFile.writeAsString(
    "root=${p.normalize(rootPath)}\npid=$_ownerPid\n",
    mode: .writeOnly,
    flush: true,
  );
}