Although the named data stream directory is hidden from the namespace, it is possible to open the name data stream directory inode with a fchdir() or fchroot() call. Some of the attributes, such as "..", are not defined for a named data streams directory. Any operation that accesses these fields can fail. Attempts to create directories, symbolic links, or device files on a named data stream directory fail. VOP_SETATTR() called on a named data stream directory or named data stream inode also fails.
The following is an alternative method for reading the hidden directory using the fchdir() call:
fd = open(filename, O_RDONLY) dfd = vxfs_nattr_open(fd, ".", O_RDONLY, mode) fchdir(dfd); dirp = opendir("."); readdir_r(dirp, (struct dirent *)&entry, &result);