-
Notifications
You must be signed in to change notification settings - Fork 5
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
Added FilecachedInputOutputStream #197
base: feature/182-new-storage
Are you sure you want to change the base?
Added FilecachedInputOutputStream #197
Conversation
init(fileCache: URL) { | ||
writableOutputStream = OutputStream(url: fileCache, append: true) | ||
writableOutputStream?.open() | ||
readableInputStream = InputStream(url: fileCache)! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force unwrapping should be avoided. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about adding a swiftlint:next:disable force_unwrapping
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah! What do you think about this?
readableInputStream = InputStream(url: fileCache)! | |
readableInputStream = InputStream(url: fileCache)! // swiftlint:disable:this force_unwrapping |
writableOutputStream?.open() | ||
readableInputStream = InputStream(url: fileCache)! | ||
cacheFile = fileCache | ||
super.init(url: fileCache)! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force unwrapping should be avoided. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here 😊
super.init(url: fileCache)! | |
super.init(url: fileCache)! // swiftlint:disable:this force_unwrapping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
Example CHANGELOG entry* **feature/improvement/bugfix** Added FilecachedInputOutputStream
[#issue_number](https://github.com/cauliframework/cauli/issues/issue_number) by @brototyp Trivial PR?If you think your PR is trivial and neither a CHANGELOG entry nor a README update is necessary, you can add a Generated by 🚫 Danger |
init(fileCache: URL) { | ||
writableOutputStream = OutputStream(url: fileCache, append: true) | ||
writableOutputStream?.open() | ||
readableInputStream = InputStream(url: fileCache)! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about adding a swiftlint:next:disable force_unwrapping
?
This PR adds a FilecachedInputOutputStreamSpec. This is a Stream that can written to and read from. This will be used, so when data is received from the server, we can pass the data one layer up while having a file everything is written to.