Add File.absname and ensure File.expand_path expands paths starting with ~
We should also rename File.split and File.join to File.split_path and File.join_path for consistency.
I would strongly advise deprecation cycle here. I use File.join extensively.
P.S. Personally I find join_path a little bit too long. Filename.join may be?
On Fri, Jan 11, 2013 at 10:38 AM, José Valim [email protected]:
We should also rename File.split and File.join to File.split_path and File.join_path for consistency.
— Reply to this email directly or view it on GitHubhttps://github.com/elixir-lang/elixir/issues/757#issuecomment-12157450.
Of course it will be deprecated first, I don't know where you get such ideas. ;)
File.join_path is one character longer than Filename.join. Another option is File.joinname, that would be compatible with absname and friends. Another option is to keep it as File.join and rename File.expand_path to File.expand.
José Valim www.plataformatec.com.br Founder and Lead Developer *
+1 for the second option :+1:
I vote for File.expand
On Sat, Jan 12, 2013 at 12:39 AM, pedrosnk [email protected] wrote:
+1 for the second option [image: :+1:]
— Reply to this email directly or view it on GitHubhttps://github.com/elixir-lang/elixir/issues/757#issuecomment-12175424.
For completeness, the reason I don't like File.split, File.join and File.expand is because they are all UNIX utilities names and could be sources of confusion.
Another option is to create a module called Path (instead of the longer Filename), inspired by Python, that would hold Path.expand, Path.absname, Path.split and friends.
I like Path
Yes, a Path module seems like a good idea. Basically every other language has a path module in some form.
:+1: for Path
+1 for Path
:100: