Skip to content

Commit

Permalink
Improve Path.expand/1 docs (#13276)
Browse files Browse the repository at this point in the history
  • Loading branch information
pnezis authored Jan 23, 2024
1 parent 8062fa0 commit 35dc65d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/elixir/lib/path.ex
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,17 @@ defmodule Path do
Converts the path to an absolute one, expanding
any `.` and `..` components and a leading `~`.
If a relative path is provided it is expanded relatively to
the current working directory.
## Examples
Path.expand("/foo/bar/../baz")
#=> "/foo/baz"
Path.expand("foo/bar/../baz")
#=> "$PWD/foo/baz"
"""
@spec expand(t) :: binary
def expand(path) do
Expand Down

0 comments on commit 35dc65d

Please sign in to comment.