public static Optional<LockFile> load(Path path) {
        if (Files.exists(path) && Files.isRegularFile(path)) {
            String contents = IoUtils.readUtf8File(path);
            Node result = Node.parseJsonWithComments(contents);
            return Optional.of(LockFile.fromNode(result));
        }
        return Optional.empty();
    }
Loads lockfile from path if it exists.

@param path path of file to load as a lockfile
@return Lockfile if it exists otherwise Optional.empty().
smithy-cli/src/main/java/software/amazon/smithy/cli/commands/LockFile.java