class SymbolicLinkHelper implements ISystemFileCommandsHelper {

  public static String createSymbolicLink(String link, String target) {
    if (isNotBlank(link) && isNotBlank(target)) {
      try {
        Path linkPath = Paths.get(link);
        Path targetPath = Paths.get(target);
        if (nonNull(linkPath) && nonNull(targetPath)) {
          createParentDirsIfNotExist(linkPath);
          Path pathObject = Files.createSymbolicLink(linkPath, targetPath);
          return pathObject.toString();
        }
      // p4ic4idea: Do not catch throwable unless you're really careful
      //} catch (Throwable thr) {
      } catch (Exception thr) {
        thr.printStackTrace();
        Log.error("Unexpected exception invoking method: %s", thr.getLocalizedMessage());
        Log.exception(thr);
      }
    }

    return null;
  }

}