Do I need to close the file after the end of the stream is reached, if it was a file stream?
Also, does the file need to be closed if there was an error reading from the stream?
Or does Elixir close the file automatically?
Example:
try do
file_path
|> File.stream!()
|> Jason.decode()
|> IO.inspect()
after
File.close(???) # don’t really have a file handle after File.stream!()
end