create static method

Future<Mmap> create(
  1. String fileName, {
  2. int prot = PROT_READ,
  3. int flags = MAP_SHARED,
  4. int offset = 0,
})

Implementation

static  Future<Mmap> create(String fileName,
    {int prot: PROT_READ, int flags: MAP_SHARED, int offset: 0}) async {
  final file = File(fileName);
  final stat = await file.stat();
  final size = stat.size;
  return Mmap._(fileName, size, prot: prot, flags: flags, offset: offset);
}