Files and streams

File in storage can contain several alternate streams. This provides additional benefits in comparison with usual file storing.

Application data can also contain metadata, i.e. information that describes the data. For example, metadata for music file is the song text or photos of musicians etc. You can use one file stream for main data and another one for metadata.

Security information, related to the file (for example, encrypted password for the file) is also metadata which can be kept in supplementary streams of the file.

If you want to manipulate different revisions of data you can use streams for keeping revisions. It is also possible to use streams for storing different representations of the same file. For example, text file can contain information in such formats as plain text, HTML, RTF.

For strengthening security you can use different encryption options for each stream of the file.

You can access each stream or create a new one using <FileName>:<StreamName> format. To access the main nameless stream use <FileName>: format. Example: \path\to\filename.ext:altstream

If you need to enumerate streams in the file, specify <FileName>:<StreamNameMask> format in FindFirst and FindNext methods. Remember that you must specify complete path for <FileName>.