Skip to content

Commit 6d918f5

Browse files
committed
Wrap around :file instead of calling internals
1 parent 4347468 commit 6d918f5

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

lib/elixir/lib/path.ex

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -573,27 +573,15 @@ defmodule Path do
573573
@moduledoc false
574574

575575
def read_link_info(file) do
576-
call({:read_link_info, file})
576+
:file.read_link_info(file)
577577
end
578578

579579
def list_dir(dir) do
580-
case call({:list_dir, dir}) do
581-
{:ok, files} ->
582-
{:ok, for(file <- files, hd(file) != ?., do: file)}
583-
584-
other ->
585-
other
580+
case :file.list_dir(dir) do
581+
{:ok, files} -> {:ok, for(file <- files, hd(file) != ?., do: file)}
582+
other -> other
586583
end
587584
end
588-
589-
@compile {:inline, call: 1}
590-
591-
defp call(tuple) do
592-
x = :erlang.dt_spread_tag(true)
593-
y = :gen_server.call(:file_server_2, tuple)
594-
:erlang.dt_restore_tag(x)
595-
y
596-
end
597585
end
598586

599587
@doc """

0 commit comments

Comments
 (0)