diff options
| author | DJ O'Leary <dijitol@proton.me> | 2025-12-01 22:52:12 +0100 |
|---|---|---|
| committer | DJ O'Leary <dijitol@proton.me> | 2025-12-01 22:52:12 +0100 |
| commit | ca7631ff2fdc6d783f1ae8043de95dcd1b6b7d08 (patch) | |
| tree | c92542fac87894f6ab8b8540bb7932fc0c5aa910 /2025/ocaml/lib/infrastructure/file_reader.ml | |
| parent | cdbf4be6fa793ca1286604bdc2a1bb5c9e6a197a (diff) | |
feat(file): implement file reader
Diffstat (limited to '2025/ocaml/lib/infrastructure/file_reader.ml')
| -rw-r--r-- | 2025/ocaml/lib/infrastructure/file_reader.ml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/2025/ocaml/lib/infrastructure/file_reader.ml b/2025/ocaml/lib/infrastructure/file_reader.ml new file mode 100644 index 0000000..7a80c0b --- /dev/null +++ b/2025/ocaml/lib/infrastructure/file_reader.ml @@ -0,0 +1,4 @@ +let read_file filename = + let chan = In_channel.open_text filename in + let content = In_channel.input_all chan in + In_channel.close chan ; content |
