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
# Example taken from MeshIO#Registering a file format#Mime(unique_identifier, file_ending, magic_number)const ply_binary =Mime(:ply_binary, :ply, b"ply\nformat binary_little_endian 1.0\n")
const ply_ascii =Mime(:ply_ascii, :ply, b"ply\nformat ascii 1.0\n")
file =file"test_ascii.ply"#just wraps the path in the file type
obj =load(file) # tries to find mime and opens io stream and returns appropriate julia object
obj =load(file, GLNormalMesh) # tries to return a GLNormalMesh while loading
obj =GLNormalMesh(file) # just works if defined in the mesh package, as call(::Type{Any}, ::File) leads# to millions of ambiguity warnings
this is heavily inspired by the approach taken in Images.jl ( I'm not sure who wrote this particular code, but probably @timholy can say something about this)
Best,
Simon
The text was updated successfully, but these errors were encountered:
Hi, what do you all think of this way of loading and registering file extensions?
https://github.com/JuliaIO/FileIO.jl/blob/master/src/core_prototype.jl
It's just a crude prototype by now:
this is heavily inspired by the approach taken in Images.jl ( I'm not sure who wrote this particular code, but probably @timholy can say something about this)
Best,
Simon
The text was updated successfully, but these errors were encountered: