Checks if type(path) returns FileSystemEntityType.DIRECTORY.
static Future<bool> isDirectory(String path) => _getTypeAsync(path, true) .then((type) => (type == FileSystemEntityType.DIRECTORY._type));