如何在 ERLANG / ELIXIR 中读取 UNC 路径

How to read a UNC path in ERLANG / ELIXIR

请问我们如何在 Elixir 或 Erlang 中读取 UNC 路径?

我尝试了 Elixir 中的文件模块,但它不起作用。

Erlang/OTP 21 [erts-10.1] [64-bit] [smp:6:6] [ds:6:6:10] [async-threads:1]

Interactive Elixir (1.7.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> s =  ~S"\flsv\Finance_Dept\FUND ACCOUNTING UNIT\27112018"   
"\\flsv\Finance_Dept\FUND ACCOUNTING UNIT\27112018"
iex(2)> s = "//flsv/Finance_Dept/FUND ACCOUNTING UNIT/27112018/"  
"//flsv/Finance_Dept/FUND ACCOUNTING UNIT/27112018/"
iex(3)> File.ls s
{:error, :enoent}

你在 Windows 吗?那么升级到 erts-10.1.1

可能会有所帮助

http://erlang.org/pipermail/erlang-questions/2018-October/096495.html

File access through UNC paths works again on Windows. This regression was introduced in OTP 21.