Closed
Description
opened on Jan 8, 2016
Below is review of current write
an read
variants in Base
.
I propose:
- deprecate
readbytes
andreadall
, replace withread
andreadstring
respectively - add filename-as-1st-arg support everywhere
Rationale:
- "bytes" is the default,
write
is notwritebytes
soreadbytes
should just beread
. readall
is named as "read_[how much]" but behaves like "read[as type]_" so it should bereadstring
.- filename-as-1st-arg is generally handy, see examples in write(filename::AbstractString, data) #14546
Deprecation and addition indicated by strikethrough and bold
below.
Filename = has read(filename::AbstractString...)
method.
Function | Filename |
---|---|
write |
|
write_[format]_ | |
writecsv |
yes |
writedlm |
yes |
writemime |
Function | Type | Filename | Whole File | Non Blocking |
---|---|---|---|---|
read_[how much]_ | ||||
read(io,T) |
T |
|||
readavailable |
Array{UInt8} |
yes | ||
readuntil |
String |
|||
readline |
String |
|||
readall |
String |
yes | yes | |
read_[as type]_ | ||||
readbytes |
Array{UInt8} |
yes | ||
read |
Array{UInt8} |
yes | ||
readstring |
String |
yes | yes | |
readlines |
Array{String} |
yes | ||
readcsv |
Array{T} |
yes | yes | |
readdlm |
Array{T} |
yes | yes | |
readdir |
Array{String} |
yes | yes | |
readlink |
String |
yes | yes | |
read_[and then]_ | ||||
readchomp(x) |
= chomp(readall(x)) |
yes | yes |
Related:
- Convenience functions for dealing with .gz files BioJulia/Libz.jl#12 -- Convenience functions for dealing with .gz files
-
14546 write(filename::AbstractString, data)
Metadata
Assignees
Labels
No labels
Activity