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
unlink doesn't complain if it tries to operate on a file that doesn't exist #2096
Comments
|
It copies the way Perl 5 does it and it in turns copies the way it's done in C. Don't know if there is a motive for it being that way, but I think the documentation should certainly have a note about it. |
|
Perl 5's |
|
Unlink behaves exactly as indicated in the documentation, which I have only clarified a little bit. It fails if you call it as a method, it returns an array as it does in your example above if called as a subroutine. If you want a count of the number of files, call |
|
None of those statements address the original issue and the documentation is still unclear and incomplete on the original issue. Why was this closed without resolution? |
|
Let's see:
The documents don't know either. However. they say:
So it clearly says:
That's OK. It fails, or not, depending on how you call it, but since you're not bothered either way, I guess that's properly addressed.
It is in the docs exactly as above, and it's been there for 3 years already. Only change has been to specify that only those files that can be deleted are actually deleted. No surprise there.
Right. Perl 6 works exactly as you noted in your example, which matches exactly what has been in the documentation for 3 years.
The behavior you noted is as expected, it's documented in a precise way, I revised the documentation, made a small precision, and made the call to close this issue, since it's, as explained above, well, a non-issue. We thank you for the report, that help us improve the documentation, even in little ways, and feel free to open any more issues on anything you consider necessary; just not this one. 👍 |
|
I don't appreciate your attitude here. I'll refrain from further participation. |
|
What do you mean exactly by "my attitude" here? |
|
OK, I get it now after @zoffixznet 's patch and @rafaelschipiura explanations in the IRC channel. All the |
In the future, a simple "Which portion needs further clarification?" would go a longer way, IMO. |
Also some possible explanation of the rationale of including non-existing files in the output list. Refs #2096, does not close, because it's been closed already. Thanks again @briandfoy for the report, and sorry for not understanding the problem from the beginning.
|
Right. If I had read more thoroughly the title, and not only the post, it
would have been clearer from the beginning too. Again my apologies.
|
|
@briandfoy I'm not liking your attitude here. He already apologized for the misunderstanding, stop stalking him if you are not going to engage in a constructive manner. |
sigh |
I don't know if
unlinkshould succeed or not for a file that doesn't exist. I would expect it to fail but if it doesn't I'm not bothered. Whatever the answer it would be nice to see it noted in the docs.Here's what I was doing on 2018.04:
And some output:
The text was updated successfully, but these errors were encountered: