tryResolveSymbolicLinks method

Future<String?> tryResolveSymbolicLinks()

Tries to resolve the path of this FileSystemEntity through resolveSymbolicLinks and returns null if the path cannot be resolved.

For example, a path cannot be resolved when it is a link to a non-existing file.

Implementation

Future<String?> tryResolveSymbolicLinks() async {
  try {
    return await resolveSymbolicLinks();
  } on FileSystemException {
    return null;
  }
}