VfsCallbackFile constructor

VfsCallbackFile(
  1. String path, {
  2. required VfsReadCallback read,
  3. required VfsWriteCallback write,
  4. int permissions = 0x1A4,
})

Creates a callback-backed virtual file at path.

read is invoked whenever Monty reads the file, write whenever it writes. Both run on the host — see the security warning on the class.

Implementation

VfsCallbackFile(
  String path, {
  required this.read,
  required this.write,
  this.permissions = 0x1A4,
}) : seededPath = normalizeVfsPath(path),
     path = normalizeVfsPath(path);