Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small doc touchups and doctests for mv #28032

Merged
merged 2 commits into from
Jul 11, 2018
Merged

Small doc touchups and doctests for mv #28032

merged 2 commits into from
Jul 11, 2018

Conversation

kshyatt
Copy link
Contributor

@kshyatt kshyatt commented Jul 10, 2018

This passed doctests locally. All the changes are to the filesystem part of the docs (@__LINE__ is displayed there).

@kshyatt kshyatt added docs This change adds or pertains to documentation filesystem Underlying file system and functions that use it labels Jul 10, 2018
@KristofferC
Copy link
Sponsor Member

I think the examples are becoming kinda excessively long (~40 lines). It's a lot of scrolling up in the terminal to get to the actual content. Is it possible to condense things a bit?

@kshyatt
Copy link
Contributor Author

kshyatt commented Jul 10, 2018

I wanted to show all the behavior mentioned in the docstring. I can strip out the parts showing the file content hasn't changed if you'd like.

base/file.jl Outdated
julia> readline("goodbye.txt")
"world2"

julia> rm("goodbye.txt")
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be removed?

base/file.jl Outdated
```jldoctest; filter = r"Stacktrace:(\\n \\[[0-9]+\\].*)*"
julia> write("hello.txt", "world");

julia> "hello.txt" in readdir()
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think we need to show that write creates the file here.

base/file.jl Outdated
julia> mv("hello.txt", "goodbye.txt", force=true)
"goodbye.txt"

julia> readline("goodbye.txt")
Copy link
Sponsor Member

@KristofferC KristofferC Jul 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need to show that mv copies content again?

base/file.jl Outdated
julia> "hello.txt" in readdir()
false

julia> "goodbye.txt" in readdir()
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove this since the line below shows that the file exist?

@kshyatt
Copy link
Contributor Author

kshyatt commented Jul 11, 2018

@KristofferC thanks for the review! Better now?

@fredrikekre fredrikekre merged commit 024a472 into master Jul 11, 2018
@fredrikekre fredrikekre deleted the ksh/touchup branch July 11, 2018 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation filesystem Underlying file system and functions that use it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants