We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
[NSData writeToURL:url atomically:YES]
currently gets converted to
Data.write(to: url, atomically: true)
which causes the compiler error
Extra argument 'atomically' in call
Data.write(to:options:) could be used instead:
Data.write(to:options:)
Data.write(to: url, options: .atomic)
However, that returns Void and throws when unsuccessful, whereas [NSData writeToURL:atomically] returns NO if unsuccessful. NSData.write(to:atomically) which returns a Bool could then be used instead of Data:
Void
[NSData writeToURL:atomically]
NO
NSData.write(to:atomically)
Bool
Data
NSData.write(to: url, atomically: true)
The text was updated successfully, but these errors were encountered:
@tomattoz @alex-swiftify Any updates on this?
Sorry, something went wrong.
@cherryblossom000 Thanks for the reminder! We'll prioritize this.
@tomattoz Please take a look at this at the earliest convenience.
@cherryblossom000 fixed this such way: NSData(data: data).write(to: url, atomically: true)
The fix will appear in 5.1.5 release.
tomattoz
No branches or pull requests
currently gets converted to
which causes the compiler error
Data.write(to:options:)
could be used instead:However, that returns
Void
and throws when unsuccessful, whereas[NSData writeToURL:atomically]
returnsNO
if unsuccessful.NSData.write(to:atomically)
which returns aBool
could then be used instead ofData
:The text was updated successfully, but these errors were encountered: