assertExists method

void assertExists(
  1. Object paths
)

Asserts a file or folder exists at each of paths.

Implementation

void assertExists(Object paths) {
  for (final String path in _paths(paths)) {
    final String normalized = normalizeDiskPath(path);
    expect(
      memory.fileExistsSync(normalized) ||
          memory.directoryExistsSync(normalized),
      isTrue,
      reason:
          'Unable to find a file or directory at path [$path] on disk [$name].',
    );
  }
}