linkTarget method
Probes path for an indirection. See CubeLinkTarget for the shapes.
Implementation
@override
CubeLinkTarget linkTarget(String path) {
try {
final type = FileSystemEntity.typeSync(path, followLinks: false);
if (type != FileSystemEntityType.link) {
return (isLink: false, target: null);
}
return (isLink: true, target: Link(path).targetSync());
} on Object {
// Link node we could stat but cannot read: fail closed rather than
// guess.
return (isLink: true, target: null);
}
}