bool containsTextFile(String name)

Source

bool containsTextFile(String name) {
  return _containsResource("TextFile", name);
}