Is it possible to convert a file to a byte array and save it at a later time while keeping all of its properties (name, type, etc)?
I’m reading email attachments and saving the bytes for future use. Issue with this is I don’t know how to determine what file extension I need to use when saving the file.
If not what are the alternatives?
name, attributes, timestamps, etc are all meta data of the file and not part of the file contents.. so you need a container format.. You could use XML, or MIME messages, or any encapsulation scheme you desire.