Commit Graph
1 Commits
Author SHA1 Message Date
Clinton NkwochaandGeorge Barnett cc1c57c291 Provide APIs to read file into more data types (#2923)
Motivation:

As requested in issues
[#2875](https://github.com/apple/swift-nio/issues/2875) and
[#2876](https://github.com/apple/swift-nio/issues/2876), it would be
convenient to be able to read the contents of a file into more data
types such as `Array`, `ArraySlice` & Foundation's `Data`.

Modifications:

- Extend `Array`, `ArraySlice` & `Data` to be initialisable with the
contents of a file.

Result:

The contents of a file can be read into more data types.

---------

Co-authored-by: George Barnett <gbarnett@apple.com>
2024-10-21 08:41:10 +00:00