fromFile


Description:

public static Scanner? fromFile (Path path)

Creates a Scanner that reads from a file.

Example:

    var scanner = Scanner.fromFile (new Path ("/tmp/data.txt"));

Parameters:

path

the file to read.

Returns:

a new Scanner, or null if the file cannot be opened.