Skip to content

Commit 47ddf36

Browse files
committed
defines new load/save functions in Dummy module rather than extending FileIO's
1 parent 08873c4 commit 47ddf36

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/loadsave.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ module Dummy
6161

6262
using FileIO
6363

64-
function FileIO.load(file::File{format"DUMMY"})
64+
function load(file::File{format"DUMMY"})
6565
open(file) do s
6666
skipmagic(s)
6767
load(s)
6868
end
6969
end
7070

71-
function FileIO.load(s::Stream{format"DUMMY"})
71+
function load(s::Stream{format"DUMMY"})
7272
# We're already past the magic bytes
7373
n = read(s, Int64)
7474
out = Vector{UInt8}(n)
@@ -77,7 +77,7 @@ function FileIO.load(s::Stream{format"DUMMY"})
7777
out
7878
end
7979

80-
function FileIO.save(file::File{format"DUMMY"}, data)
80+
function save(file::File{format"DUMMY"}, data)
8181
open(file, "w") do s
8282
write(s, magic(format"DUMMY")) # Write the magic bytes
8383
write(s, convert(Int64, length(data)))

0 commit comments

Comments
 (0)