Okay, I have a related question. I had a go at implementing the :read_link option last night and
this code failed.
if( Keyword.has_key?(opts,:read_link),
do: read_info = F.read_link_info ,
else: read_info = F.read_file_info
case read_info.((IO.chardata_to_string(path), opts) do
but this code worked.
if( Keyword.has_key?(opts,:read_link),
do: read_info = F.read_link_info(IO.chardata_to_string(path), opts) ,
else: read_info = F.read_file_info(IO.chardata_to_string(path), opts) )
case read_info do
The error message was
==> elixir (compile)
** (UndefinedFunctionError) undefined function: :file.read_file_info/0
My best guess is that something different is required when matching a direct erlang functions to a variable, since the . convention
doesn't seem to work in this case. What's the right way to call an erlang function to matched to a variable?
thanks,
- Booker C. Bense