Skip to content

Commit

Permalink
improve docs for mktempdir (#22078)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre authored and KristofferC committed May 26, 2017
1 parent 03639b9 commit b1b01b5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions base/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -359,14 +359,16 @@ mktemp(parent)
mktempdir(parent=tempdir())
Create a temporary directory in the `parent` directory and return its path.
If `parent` does not exist, throw an error.
"""
mktempdir(parent)


"""
mktemp(f::Function, parent=tempdir())
Apply the function `f` to the result of `mktemp(parent)` and remove the temporary file upon completion.
Apply the function `f` to the result of [`mktemp(parent)`](@ref) and remove the
temporary file upon completion.
"""
function mktemp(fn::Function, parent=tempdir())
(tmp_path, tmp_io) = mktemp(parent)
Expand All @@ -381,8 +383,8 @@ end
"""
mktempdir(f::Function, parent=tempdir())
Apply the function `f` to the result of `mktempdir(parent)` and remove the temporary
directory upon completion.
Apply the function `f` to the result of [`mktempdir(parent)`](@ref) and remove the
temporary directory upon completion.
"""
function mktempdir(fn::Function, parent=tempdir())
tmpdir = mktempdir(parent)
Expand Down

0 comments on commit b1b01b5

Please sign in to comment.