isDirectory 静态方法
- String path
判断 path 是否指向一个目录。
检查 type(path) 是否返回 FileSystemEntityType.directory。
实现
static Future<bool> isDirectory(String path) =>
_getType(_toUtf8Array(path), true)
.then((type) => (type == FileSystemEntityType.directory));