Veritas™ File System 5.0.1 Programmer's Reference Guide

Figure 4-1
Alternate Namespace
/
file1
Alternate namespace
for named data
streams
data_stream_1
data_stream_2
The file1 file has two named data streams: data_stream_1 and data_stream_2.
Every file can have its own alternate namespace to store named data streams. The
alternate namespace can be accessed through the named data stream APIs
supported by VxFS.
Access to the named data stream can be done through a file descriptor using the
named data stream library functions. Applications can open the named data
stream to obtain a file descriptor and perform read(), write(), and mmap() operations
using the file descriptor. These system calls work as though they are operating
on a regular file. The named data streams of a file are stored in a hidden named
data stream directory inode associated with the file. The hidden directory inode
for the file can be accessed only through the named data stream application
programming interface.
There are no VxFS-supplied administrative commands to use this feature. A VxFS
API is provided for creating, reading, and writing the named data streams of a
file.
Uses for named data streams
Named data streams allow applications to attach information to a file that appears
to be hidden. An administrative program could use this to attach file usage
information, backup information, and so on. An application could use this feature
to hide or collect file attachments. For example, a multi-media document could
have all text, audio clips, and video clips organized in one file rather than in several
files. A document being reviewed by multiple people could have each persons
comments attached to the file as a named data stream.
Named data streams application programming
interface
The following standard system calls can manipulate named data streams:
Named data streams
Uses for named data streams
64