entity property
FileSystemEntity?
get
entity
Implementation
FileSystemEntity? get entity {
final type = FileSystemEntity.typeSync(_path);
if (type == FileSystemEntityType.file) {
return File(_path);
} else if (type == FileSystemEntityType.directory) {
return Directory(_path);
} else if (type == FileSystemEntityType.link) {
return Link(_path);
} else {
return null;
}
}