withCopyContent method

GenericContainer withCopyContent(
  1. Object content,
  2. String containerPath, {
  3. int mode = 420,
})

Creates the file containerPath with content (a String or bytes) in the container before it starts.

Implementation

GenericContainer withCopyContent(
  Object content,
  String containerPath, {
  int mode = 420,
}) {
  _copies.add(
    _Copy(
      containerPath,
      mode,
      content: content is String
          ? utf8.encode(content)
          : content as List<int>,
    ),
  );
  return this;
}