contentAsArchive method

Future<Archive?> contentAsArchive()

Content as an Archive instance. Warning: Archive is only supported for a local file, for now.

Implementation

Future<Archive?> contentAsArchive() async {
  if (content is SnifferFileContent && !loadedContentAsArchive) {
    loadedContentAsArchive = true;
    _contentAsArchive = await (content as SnifferFileContent?)
        ?.let((it) => DefaultArchiveFactory().open(it.file, null));
  }
  return _contentAsArchive;
}