I want a file to carry some additional information like a Id of a record.
Can we add some additional metadata or anything in a file?
Can we add some additional byte stream which do not corrupt the file?
Please help me.
Thanks
I want a file to carry some additional information like a Id of a record.
Can we add some additional metadata or anything in a file?
Can we add some additional byte stream which do not corrupt the file?
Please help me.
Thanks
Copyright © 2021 Jogjafile Inc.
Yes, you can write metadata to files using what is called extended attributes. Here is a wiki link for more information on that (https://en.wikipedia.org/wiki/Extended_file_attributes)
It depends on what language are you going to read and write to this attributes.
For example in PHP you can use the PECL library xattr's function (http://php.net/manual/en/function.xattr-set.php)
On Node.JS you would use a library like that fs-xattr (https://www.npmjs.com/package/fs-xattr)
Notes:
For example there is Exif (https://en.wikipedia.org/wiki/Exchangeable_image_file_format#Example) for JPEG images.
Or ID3 (https://en.wikipedia.org/wiki/ID3) for MP3 and etc.