4.2 Common Values

The common values of File System Services are described in the following sections:

4.2.1 Effective Rights Values

The bit values for effective rights are as follows:

4.2.2 Features Values

Not all features of NSS are available or enabled for all volumes, pools, or LSSes. A particular LSS might support a feature but the administrator can choose not to enable that feature for a particular volume. For example, ZLSS supports salvage; however, for any particular ZLSS volume, the administrator can choose to disable salvage for that volume.

There are two fields that are defined to know which features are available: one that says which features are available and another to say which features are enabled. Both are 64-bit fields.

zFEATURE_SALVAGE

The ability to store deleted files, to enumerate them, salvage them, and to purge them.

zFEATURE_READONLY

If enabled, the object is read-only and cannot be written.

zFEATURE_COMPRESSION

The ability to store and manage files in a compressed format.

zFEATURE_USER_SPACE_RESTRICTIONS

The ability to keep track of the space used by each user.

zFEATURE_EXTENDED_ATTRIBUTES

Extended attributes can be stored and retrieved for a file.

zFEATURE_DATA_STREAMS

Can store and manage multiple data streams for a file including the Macintosh Resource Fork.

zFEATURE_DOS_METADATA

Can store and manage basic DOS metadata and attributes including Read-only, Hidden, System, and the basic DOS dates and time.

zFEATURE_NETWARE_METADATA

Can store and manage NetWare file metadata including all the NetWare attributes, creation time, archived time, modified time, accessed time, metadata modified time, primary namespace information, etc.

zFEATURE_MAC_METADATA

Can store and manage Macintosh metadata including resource forks and MAC finder information. Because resource fork must be stored, zFEATURE_DATA_STREAMS must also be set.

zFEATURE_UNIX_METADATA

Can store and manage UNIX metadata as required by the Novell® NFS product.

zFEATURE_HARD_LINKS

Allows multiple names in the same namespace for one file.

zFEATURE_TRANSACTION

User-level transactions can be used to ensure that either all updates occur or none of the updates occur.

zFEATURE_SPARSE_FILES

Sparse files can be stored and managed by the file system.

zFEATURE_PHYSICAL_EOF

A file can be extended or truncated without changing the logical end of the file.

zFEATURE_DIRECT_IO

The application can bypass the NSS cache and talk directly to the disk.

zFEATURE_PERSISTENT_FEATURES

The values defined in the these feature fields can be saved. It also means that some can be modified.

zFEATURE_VERIFY

The file system can check itself for inconsistencies.

zFEATURE_REBUILD

The file system has a built-in repair utility.

4.2.3 File Attributes Values

The file attributes parameter is a 64-bit mask that specifies the attributes associated with a file object.

zFA_READ_ONLY

This bit behaves like the DOS read-only file attributes. If set, the file might not be modified or deleted.

zFA_HIDDEN

This bit behaves like the DOS hidden file attribute. When using client utilities that honor this bit, the file is not visible.

zFA_SYSTEM

This bit behaves like the DOS system file attribute. It flags the file as being a system file.

zFA_EXECUTE

This bit is preserved by NSS, but is not used by the Z-APIs. The traditional NetWare Semantic Agent uses this bit.

zFA_SUBDIRECTORY

If this bit is set, the file is a directory container file object, the contents of which can be read using the zWildRead interfaces. Many of the file object types are directory container file objects, meaning that they contain other objects. File object types that are directory containers must have this bit set, and those that are not must not have this bit set.

zFA_ARCHIVE

This bit behaves like the DOS Archive attribute. If this bit is set, the file has been modified, but not yet archived. A backup utility should clear this bit after the file has been archived.

zFA_SHAREABLE

This bit is preserved by NSS, but is not currently used.

zFA_SMODE_BITS

This is a series of three bits. The file system reserves and stores these bits, but has no knowledge of their usage or interpretation. These bits are manipulated by clients, and are used as a place to store search modes associated with a file.

zFA_NO_SUBALLOC

This bit is preserved by NSS, but is not currently used, because suballocation is not supported.

zFA_IMMEDIATE_PURGE

If this bit is set, the file is not moved to the salvage system when it is deleted. A file that is deleted while this attribute is in effect can not be undeleted.

zFA_RENAME_INHIBIT

If this bit is set, the file cannot be renamed.

zFA_DELETE_INHIBIT

If this bit is set, the file cannot be deleted.

zFA_COPY_INHIBIT

If this bit is set, the file cannot be copied. It can be used by the client but not enforced by NSS.

zFA_REMOTE_DATA_INHIBIT

This bit is preserved by NSS, but is not currently used, because data migration is not yet supported.

zFA_COMPRESS_FILE_IMMEDIATELY

This bit triggers compression as soon as the file is closed.

zFA_DO_NOT_COMPRESS_FILE

This bit prevents the file from being compressed.

zFA_DATA_STREAM_IS_COMPRESSED_BIT

This bit indicates that the file is currently compressed.

zFA_CANT_COMPRESS_DATA_STREAM_BIT

This bit indicates that the data stream cannot be compressed.

zFA_ATTR_ARCHIVE

This bit behaves similar to the zFA_ARCHIVE bit, but it is only associated with the metadata of a file rather than the normal file data. If this bit is set, the file’s metadata has been modified, but not yet archived. A backup utility should clear this bit after the file’s metadata has been archived.

zFA_IS_LINK

This bit identifies this file object as representing either a symbolic link, a junction, or a URL link. The data stream for the file object contains the link information.

zFA_VOLATILE (0x80000000)

This bit prevents opportunistic locks from being returned. It also indicates that even if you have the file open for read-only, the contents can change. For example, if you read the same location from the file twice, you can get two different answers.

The end-of-file marker is not well defined for files marked with this attribute.

The following bits are supported in the traditional NetWare file system but are not yet supported in NSS. Support might be added for these bits as additional features are added to NSS.

The following bits are supported in the traditional NetWare file system but are deprecated for the zAPIs and are only available through the traditional NetWare APIs.

zFA_TRANSACTION

The zAPIs supply the transaction on the individual calls rather then setting a state in the open file. This lets one open file be used in multiple transactions.

4.2.4 File Type Values

The fileType parameter is used by zCreate to identify the type of file to be created. NSS supports several different types of file objects, the most basic of which is a file. Other types are used to represent system components such as storage pools, extended attributes. and volumes, or even the NSS file system itself. The various components of the system can be enumerated by scanning the directories that contain these system component file objects and reading the information stored with those file objects.

zFILE_REGULAR

A normal data file or directory.

zFILE_EXTENDED_ATTRIBUTE

An extended attribute. Arbitrary metadata can be attached to a file.

zFILE_NAMED_DATA_STREAM

An additional streams attached to a file. Used to implement resource forks for Macintosh support.

zFILE_PIPE

(Future plan) Acts like a UNIX named pipe.

zFILE_VOLUME

A volume contains a set of files and directories.

zFILE_POOL

A pool contains storage that might be used by volumes.

4.2.5 Get Info Mask Values

The getInfoMask parameter is a 64-bit mask that specifies the file object information to be returned in the zInfo_s structure by zGetInfo. If no bits are set, no information is returned. Bits that don’t make sense for the given object are ignored.

zGET_STD_INFO

Get the standard information about the file.

zGET_NAME

Get the name of the file object for the namespace and hard link used to locate the file object.

zGET_ALL_NAMES

Get the name of the file object for each namespace in which a valid name exists. Also, get the NameSpaceID of the name that is considered the original name for the file object. For a file object with multiple hard links, this only gets the names associated with the link used to find the file object.

zGET_PRIMARY_NAMESPACE

Get the nameSpaceID of the primary namespace for this file object’s name.

zGET_TIMES_IN_SECS

Get the various time stamps associated with the file object in seconds. Although time is returned in seconds, the underlying system can only keep a resolution of 2 seconds.

zGET_TIMES_IN_MICROS

Get the various time stamps associated with the file object in micro-seconds. Though time is returned in micro-seconds, the underlying system may only keep a resolution of 1 or 2 seconds. Note that only zGET_TIMES_IN_SECS or zGET_TIMES_IN_MICROS but not both can be set.

zGET_IDS

Get the various eDirectory object IDs associated with this file object.

zGET_STORAGE_USED

Get information for this file object about the physical disk storage that is used.

zGET_BLOCK_SIZE

Get information about the file object’s block size.

zGET_COUNTS

Get the file open count and hard link count information about the file object.

zGET_EXTENDED_ATTRIBUTE_INFO

Get summary information about extended attributes owned by this file object.

zGET_DATA_STREAM_INFO

Get summary information about data streams owned by this file object.

zGET_DELETED_INFO

Get deleted file information about the file. This includes the time in micro-seconds that the file was deleted and the user ID of the user who deleted the file.

zGET_MAC_METADATA

Get the file object’s Macintosh metadata information.

zGET_UNIX_METADATA

Get the file object’s UNIX metadata information.

zGET_EXTATTR_FLAGS

If the file object is an extended attribute, this bit returns the extAttrUserFlags.

zGET_VOLUME_INFO

If the file object is a volume, this bit returns the basic information about the volume.

zGET_VOL_SALVAGE_INFO

If the file object is a volume, this bit returns the salvage information for the volume.

zGET_DIR_QUOTA

If the file object is a directory, this bit returns the directory quota information for the directory.

NOTE:This bit requires zInfoB_s, which implies the zINFO_VERSION_B flag.

zGET_POOL_INFO

If the file object is a pool, this bit returns the basic information about the pool.

4.2.6 Inherited Rights Mask Values

The inheritedRightsMask parameter specifies the rights inherited while resolving a filename.

zAUTHORIZE_READ_CONTENTS

The user is allowed to read the contents of the files at this level in the tree and below.

zAUTHORIZE_WRITE_CONTENTS

The user is allowed to modify the contents of the files at this level in the tree and below.

zAUTHORIZE_CREATE_ENTRY

The user is allowed to create new files in this directory or below in the tree.

zAUTHORIZE_DELETE_ENTRY

The user is allowed to delete files in the directory or below in the tree.

zAUTHORIZE_ACCESS_CONTROL

The user is allowed to change the access control metadata in the tree or below.

zAUTHORIZE_SEE_FILE

The user can see the filenames in this directory and below.

zAUTHORIZE_MODIFY_METADATA

The user can modify the metadata for files at this level in the tree and below.

zAUTHORIZE_SUPERVISOR

The user is granted supervisor rights at this level in the tree and below.

zAUTHORIZE_SALVAGE

The user can salvage files at this level in the tree and below.

4.2.7 Match Attributes Values

The matchAttributes parameter is a bit mask that specifies what attributes a file must have to match in a wild card request. If no match attribute is given, all file objects match. The following masks can be combined by ORing to match on hidden, directory, and system attributes. For example, if you specify zMATCH_HIDDEN | zMATCH_SYSTEM, the matching file object must have both the attributes of HIDDEN and SYSTEM set (not HIDDEN or SYSTEM attributes).

zMATCH_HIDDEN

Matches if the hidden bit is set on the file.

zMATCH_NON_HIDDEN

Matches if the hidden bit is not set on the file. If both zMATCH_NON_HIDDEN and zMATCH_HIDDEN are set, nothing matches. If neither are set, both hidden and non-hidden files match.

zMATCH_DIRECTORY

Matches if the file object is a directory.

zMATCH_NON_DIRECTORY

Matches if the file object is not a directory. If both zMATCH_NON_DIRECTORY and zMATCH_DIRECTORY are set, nothing matches. If neither are set, both directories and other files match.

zMATCH_SYSTEM

Matches if a system file.

zMATCH_NON_SYSTEM

Matches if not a system file. If both zMATCH_NON_SYSTEM and zMATCH_SYSTEM are set, nothing will match. If neither are set, both system and non-system files match.

zMATCH_ALL

Matches all file objects in the given directory.

4.2.8 Modify Info Mask Values

The modifyInfoMask parameter is a 64-bit mask that specifies the file object information to be modified in the zInfo_s structure. If a bit is set in this bit mask, the corresponding field of modifyInfo is used to modify the file. All other fields in the zInfo_s structure (for which the bits are not set) are ignored. If a bit doesn’t make sense for a particular file object, it is ignored.

zMOD_FILE_ATTRIBUTES

Modify the file object’s attributes.

zMOD_CREATED_TIME

Modify the file object’s creation time.

zMOD_ARCHIVED_TIME

Modify the file object’s last archived time.

zMOD_MODIFIED_TIME

Modify the file object’s last modified time.

zMOD_ACCESSED_TIME

Modify the file object’s last accessed time.

zMOD_METADATA_MODIFIED_TIME

Modify the file object’s last metadata modified time.

zMOD_OWNER_ID

Modify the file object’s owner ID.

zMOD_ARCHIVER_ID

Modify the file object’s archiver ID.

zMOD_MODIFIER_ID

Modify the file object’s modifier ID.

zMOD_METADATA_MODIFIER_ID

Modify the file object’s metadata modifier ID.

zMOD_PRIMARY_NAMESPACE

Modify the file object’s primary namespace ID.

zMOD_DELETED_INFO

Modify the file object’s deleted info. If the file object is not deleted, this is ignored.

zMOD_DELETED_ID

Modify the file object’s deleted ID info only. If the file object is not deleted, this is ignored.

zMOD_MAC_METADATA

Modify the file object’s Macintosh metadata.

zMOD_UNIX_METADATA

Modify the file object’s UNIX metadata.

zMOD_EXTATTR_FLAGS

If the file object is an extended attribute, modify the value of extAttrUserFlags.

zMOD_VOL_FEATURES

If the file object is a volume, enable or disable the features associated with this volume.

zMOD_VOL_NDS_OBJECT_ID

If the file object is a volume, modify the value of the eDirectory object ID that identifies this volume in the tree.

zMOD_VOL_MIN_KEEP_SECONDS

If the file object is a volume, modify the value of salvage.minKeepSeconds. This is the minimum number of seconds that a deleted file remains on the volume before it becomes a candidate for auto purging.

zMOD_VOL_MAX_KEEP_SECONDS

If the file object is a volume, modify the value of salvage.maxKeepSeconds. This is the maximum number of seconds that a deleted file remains on the volume before it must be auto purged.

zMOD_VOL_LOW_WATER_MARK

If the file object is a volume, modify the value of salvage.lowWaterMark. This is an integer percentage value. If the percentage of free space on the volume falls below this value, auto purging is initiated.

zMOD_VOL_HIGH_WATER_MARK

If the file object is a volume, modify the value of salvage.highWaterMark. This is an integer percentage value. If the percentage of free space on the volume rises above this value, auto purging is terminated.

zMOD_VOL_QUOTA

Allows you to change the quota on a volume.

4.2.9 Namespace ID Values

The following namespaces are defined:

zNSPACE_DOS

This namespace supports 8.3 names. All names are stored in uppercase and use standard DOS file naming rules.

zNSPACE_MAC

This namespace supports 31-byte Macintosh filenames. The names are case preserving but not case sensitive. The names follow the standard Macintosh file naming rules.

zNSPACE_UNIX

This namespace supports 256-byte names. All names are stored in a case-preserving manner, and names are case sensitive. The names follow the standard UNIX file naming rules.

zNSPACE_LONG

This namespace supports 256-byte names. All names are stored in a case-preserving manner, but names are not case sensitive. The names use the standard file naming rules of Windows* 95, Windows NT*, and OS/2*.

zNSPACE_DATA_STREAM

This namespace is used for data streams. It is supported for names whose name type is zNTYPE_DATA_STREAM. It has the same name semantics as the long namespace.

zNSPACE_EXTENDED_ATTRIBUTE

This namespace is used for extended attributes. It is supported for names whose name type is zNTYPE_EXTENDED_ATTRIBUTE. It has the same name semantics as the those in the current NetWare extended attributes.

4.2.10 Name Type Values

The following name types are defined:

zNTYPE_FILE

This name type is used for all standard files and subdirectories.

zNTYPE_DATA_STREAM

This name type is used for named data streams that use the data stream namespace to store their name.

zNTYPE_EXTENDED_ATTRIBUTE

This name type is used for named data streams that use the extended attribute namespace to store their name.

zNTYPE_DELETED_FILE

This name type is used for files and subdirectories that have been deleted, but that are still stored in the salvage system, from which they can be undeleted.

4.2.11 Rename Flags Values

This is a bit mask that identifies various modes to be communicated when renaming a file object.

zRENAME_ALLOW_RENAMES_TO_MYSELF

If this bit is set, file objects can be renamed to the same name without generating an error. If this bit is not set, an attempt to rename a file object to itself generates an error.

zRENAME_THIS_NAME_SPACE_ONLY

If this bit is set, then the file object is only renamed in the specified namespace, and it cannot be moved to another destination directory. The name remains unchanged in the other namespaces. If this bit is not set, the file object is renamed in all applicable namespaces, and it can be moved to a different directory.

4.2.12 Requested Rights Values

This is a bit mask identifying requested access rights and behaviors to be associated with a key. These bits are not stored with the file. Instead, they are temporary bits associated with an open instance of the file.

zRR_READ_ACCESS

Read access is requested on the open file handle.

zRR_WRITE_ACCESS

Write access is requested on the open file handle.

zRR_DENY_READ

Deny read access is requested on the open file handle. No other readers should be allowed to have the file open.

zRR_DENY_WRITE

Deny write access is requested on the open file handle. No other writers should be allowed to have the file open.

zRR_SCAN_ACCESS

Scan access to file object. You can use zWildRead to scan the files, subdirectories, and attributes of a file or directory.

zRR_DELETE_FILE_ON_CLOSE

When the file is closed, it is deleted.

zRR_FLUSH_ON_CLOSE

Flush the user data and metadata for the file when it is closed. If the file is closed by the system because of a disconnect, it is still flushed.

zRR_PURGE_IMMEDIATE_ON_CLOSE

Works with zRR_DELETE_FILE_ON_CLOSE to keep the file from being placed in the salvage system when it is deleted on close.

zRR_DIO_MODE

Opens a file in direct I/O mode. Replaces having a separate call to change to direct I/O mode.

zRR_DONT_READ_AHEAD_ON_OPEN

Opens a file only. Does not read ahead data blocks (default value is 2) for any open file, if the file size is > 0. Used by SMS for performing backup, when parallel files are open.

zRR_CREATE_WITHOUT_READ_ACCESS

When this bit is set, a file object can be created if read access was requested, even if the read access is not allowed.

zRR_CANT_DELETE_WHILE_OPEN

While the file is open with this bit set, it cannot be deleted.

zRR_DONT_UPDATE_ACCESS_TIME not implemented

When the file is opened, the metadata last accessed time should not be updated. Intended to let the clients access the icon information without causing a change in the file metadata that eventually needs to be written to disk.

zRR_ENABLE_IO_ON_COMPRESSED_DATA_BIT

Rather than reading the decompressed version of the data stream, read the compressed version of the data stream. zERR_DENY_WRITE must be set for this compression flag to work.

zRR_LEAVE_FILE_COMPRESSED_BIT

Keep the compressed version of the file even after decompressing it.

zRR_READ_ACCESS_TO_SNAPSHOT

Return information from the snapshot and not the original file object.

The following bits are supported in the traditional NetWare file system but are not yet supported in NSS: FILE_READ_THROUGH_BIT, FILE_WRITE_THROUGH_BIT, ALWAYS_READ_AHEAD_BIT, NEVER_READ_AHEAD_BIT, NO_RIGHTS_CHECK_ON_OPEN_BIT ALLOW_SECURE_DIRECTORY_ACCESS_BIT

4.2.13 Volume State Values

This is a value identifying the state associated with this volume.

zVOLSTATE_UNKNOWN

The state of this volume is unknown.

zVOLSTATE_DEACTIVE

This volume has been deactivated and is not available for use.

zVOLSTATE_MAINTENANCE

This volume is in a maintenance state. It is either being checked or repaired and is temporarily not available for use.

zVOLSTATE_ACTIVE

This volume is active and available for use.