You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FileIO now implements following modes of open() by using load() and save()
r | read
r+ | read, write
w | write, create, truncate
w+ | read, write, create, truncate
a | write, create, append
a+ | read, write, create, append
I'd like to implement load!() in my packages for opening files in (at least) r+ mode. This helps with large, streamed, files that I don't want to duplicate by using load and save.
At the moment I would do:
functionload(f::File{format"example"}; mutable=false)
# file, readable, writable, create, truncate, appendopen(f, true, mutable, false, false, false) do s
..etc..load!(f::File{format"") =load(f, mutable=true)
But should FileIO also export FileIO.load!? I guess the same can be asked for #78, where my use case is partly implemented (streaming). We could in theory also export a loadstreaming! method.
The text was updated successfully, but these errors were encountered:
If you still want this, a keyword argument would be the way to go to pass the file-opening mode. But of course you can do this manually by opening the file and passing a stream.
Since this may already be possible, I'll close this pending a PR.
FileIO now implements following modes of
open()
by usingload()
andsave()
I'd like to implement
load!()
in my packages for opening files in (at least) r+ mode. This helps with large, streamed, files that I don't want to duplicate by usingload
andsave
.At the moment I would do:
But should FileIO also export
FileIO.load!
? I guess the same can be asked for #78, where my use case is partly implemented (streaming). We could in theory also export aloadstreaming!
method.The text was updated successfully, but these errors were encountered: