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

Add hasQuarantineAttribute to FileSystem #411

Merged
merged 2 commits into from
Apr 20, 2023
Merged

Conversation

MaxDesiatov
Copy link
Contributor

This new function returns true if a given path has a quarantine attribute applied if when file system supports this attribute, and returns false if such attribute is not applied or it isn't supported.

This new function returns `true` if a given path has a quarantine attribute applied if when file system supports this attribute, and returns `false` if such attribute is not applied or it isn't supported.
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@@ -341,6 +347,16 @@ private final class LocalFileSystem: FileSystem {
return FileInfo(attrs)
}

func hasQuarantineAttribute(_ path: AbsolutePath) -> Bool {
#if os(macOS)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably be canImport(Darwin)?

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

@MaxDesiatov MaxDesiatov merged commit 22c4a91 into main Apr 20, 2023
@MaxDesiatov MaxDesiatov deleted the maxd/fs-has-quarantine branch April 20, 2023 23:12
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