Changing API fundamentally to adopt Swift 5 improvements
This version changes AMSMB2's public API to exploit new Swift features, while providing an Objective-C compatibility layer.
- Return
Result
in completion handler instead of nullable pairs- You can use
switch
to handle result or error, see readme
- You can use
- Accepting
DataProtocol
instead of concreteData
- You can pass
[UInt8]
orDispatchData
towrite(data:)
method without casting
- You can pass
- Accepting Range instead of offset-length pair
- Use the same range you already use to subscript data for
contents(atPath:range:)
method
- Use the same range you already use to subscript data for
- Disconnect gracefully
disconnect(graceful: true)
will wait until all queued file operations are done and their completion handler is executed.
- Reading from / writing to
InputStream
/OutputStream
directly. - Fixed reporting incorrect creation date of file