Skip to content

Commit 32cb8cb

Browse files
committed
Add support for fileio_* names
1 parent b81b089 commit 32cb8cb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/loadsave.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ for fn in (:load, :loadstreaming, :metadata)
173173
for library in libraries
174174
try
175175
Library = checked_import(library)
176+
gen2_func_name = Symbol("fileio_" * $(string(fn)))
177+
if isdefined(Library, gen2_func_name)
178+
return eval(Library, :($gen2_func_name($q, $args...; $options...)))
179+
end
176180
if !has_method_from(methods(Library.$fn), Library)
177181
throw(LoaderError(string(library), "$($fn) not defined"))
178182
end
@@ -193,6 +197,10 @@ for fn in (:save, :savestreaming)
193197
for library in libraries
194198
try
195199
Library = checked_import(library)
200+
gen2_func_name = Symbol("fileio_" * $(string(fn)))
201+
if isdefined(Library, gen2_func_name)
202+
return eval(Library, :($gen2_func_name($q, $data...; $options...)))
203+
end
196204
if !has_method_from(methods(Library.$fn), Library)
197205
throw(WriterError(string(library), "$($fn) not defined"))
198206
end

0 commit comments

Comments
 (0)