0
오픈 IoDevice에서 읽는 기능이 있습니다. {error, Reason}의 경우 파일 이름을 출력하고 싶습니다.Erlang의 IoDevice에서 파일 이름 가져 오기
어떻게하면됩니까?
소스 코드 :
read_file(IoDevice) ->
case read_file(IoDevice, []) of
{ok, OpCodes} ->
OpCodes;
{error, Reason} ->
io:format("Unable to read file ~s: ~s ~n", [File, Reason]),
[]
end.