File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/main/java/io/github/benas/unixstream Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,19 @@ static UnixStream<String> cat() throws IOException {
46
46
* @throws IOException thrown if an error occurs during reading the file
47
47
*/
48
48
static UnixStream <String > cat (final String filePath ) throws IOException {
49
+ return cat (Paths .get (filePath ));
50
+ }
51
+
52
+ /**
53
+ * Create a new UnixStream of lines of the given file.
54
+ *
55
+ * @param filePath the absolute file path
56
+ * @return a new UnixStream of lines of the given file.
57
+ * @throws IOException thrown if an error occurs during reading the file
58
+ */
59
+ static UnixStream <String > cat (final Path filePath ) throws IOException {
49
60
Objects .requireNonNull (filePath , "The file path must not be null" );
50
- return new UnixStreamImpl <>(lines (Paths . get ( filePath ) ));
61
+ return new UnixStreamImpl <>(lines (filePath ));
51
62
}
52
63
53
64
/**
You can’t perform that action at this time.
0 commit comments