exists static method

bool exists(
  1. String path
)

检查文件或目录是否存在

Check if file or directory exists

Implementation

static bool exists(String path) {
  return File(path).existsSync() || Directory(path).existsSync();
}