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

Implement ._hidden on Windows #2332

Merged
merged 1 commit into from
Jun 19, 2019
Merged

Implement ._hidden on Windows #2332

merged 1 commit into from
Jun 19, 2019

Conversation

gmittert
Copy link
Contributor

Windows has a specific attribute to mark a file as hidden as opposed to
prefixing ".". This allows setting and getting the attribute. On POSIX,
it will return based on the "." prefix and setting it does nothing.

@gmittert
Copy link
Contributor Author

@millenomi Are you okay with adding in attributes, especially ones that are more Windows specific? If not, what would be the better way to add this support?

cc @compnerd

Copy link
Contributor

@millenomi millenomi left a comment

Choose a reason for hiding this comment

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

Public API cannot be added like this; sorry.

@millenomi
Copy link
Contributor

(There is already a private ._hidden attribute, IIRC?)

@millenomi
Copy link
Contributor

millenomi commented Jun 11, 2019

I can consider a Windows-only attribute that is prefixed if there is a compellingly strong use case other than completeness; but the right way to do this is to ask for a new API by filing a bug. However, in this case, we already have API that corresponds to this in a more modern API (it's URLResourceKey.isHiddenKey), and we tend to not duplicate, so I would advise making sure that that one works correctly instead.

@gmittert gmittert changed the title Add a .hidden file attribute Implement ._hidden on Windows Jun 11, 2019
@gmittert
Copy link
Contributor Author

gmittert commented Jun 11, 2019

I see, I misunderstood how the private attributes worked. I've changed it to use _hidden via URLResource now.

@gmittert
Copy link
Contributor Author

@swift-ci please test linux

@millenomi
Copy link
Contributor

@swift-ci please test linux

@gmittert
Copy link
Contributor Author

@swift-ci please test linux

@gmittert
Copy link
Contributor Author

@swift-ci please test linux

Windows has a specific attribute to mark a file as hidden as opposed to
prefixing ".". This allows setting and getting the attribute.
@gmittert
Copy link
Contributor Author

@swift-ci please test

@gmittert gmittert merged commit 000c62b into swiftlang:master Jun 19, 2019
@gmittert gmittert deleted the Hidden branch June 19, 2019 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants