File
case File.read(file) do
{:ok, body} -> # do something with the `body`
{:error, reason} -> # handle the error caused by `reason`
end
File.read!("existing") # "... contents ..."
File.read!("unknown") #**(File.Error) ...{:ok, file} = File.open("hello", [:write]) # {:ok, #PID<0.47.0>}
IO.binwrite(file, "world") #:ok
File.close(file) #:ok
File.read("hello") #{:ok, "world"}Path
iex> Path.join("foo", "bar")
"foo/bar"
iex> Path.expand("~/hello")
"/Users/jose/hello"Last updated