Skip to content

Commit

Permalink
Add compat note re File/Stream
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Mar 8, 2021
1 parent 8778bea commit 125a3fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "FileIO"
uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
version = "1.6.1"
version = "1.6.2"

[deps]
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Expand Down
8 changes: 8 additions & 0 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ formatname(::Formatted{F}) where F<:DataFormat = formatname(F)
`File{fmt}(filename)` indicates that `filename` is a file of known
[`DataFormat`](@ref) `fmt`. For example, `File{format"PNG"}(filename)` would indicate a PNG
file.
!!! compat
`File{fmt}(filename)` requires FileIO 1.6 or higher. The deprecated syntax `File(fmt, filename)` works
on all FileIO 1.x releases.
"""
struct File{F<:DataFormat, Name} <: Formatted{F}
filename::Name
Expand Down Expand Up @@ -60,6 +64,10 @@ written in known format [`DataFormat`](@ref) `fmt`.
For example, `Stream{format"PNG"}(io)` would indicate PNG format.
If known, the optional `filename` argument can
be used to improve error messages, etc.
!!! compat
`Stream{fmt}(io, ...)` requires FileIO 1.6 or higher. The deprecated syntax `Stream(fmt, io, ...)` works
on all FileIO 1.x releases.
"""
struct Stream{F <: DataFormat, IOtype <: IO, Name} <: Formatted{F}
io::IOtype
Expand Down

0 comments on commit 125a3fb

Please sign in to comment.