16.3 Primary Entry Information

As the primary NetWare name space, the DOS name space performs a special role in the NetWare file system. All entries are represented in the DOS name space no matter what name space actually "owns" them. Consequently, if you create an entry in a name space other than DOS, you can still access the primary entry information from the DOS name space (see Primary Entry Information Functions).

This primary NetWare information is extended beyond DOS to accommodate Macintosh data, including information such as the number of data streams (forks) and extended attributes (Finder information).

In addition to letting you read an entry’s primary information in the DOS name space, Name Space Services enable you to read and modify this information in the name space that the entry was created in. The primary information in the owning name space varies little from what appears in the DOS name space. However, it does include the file’s long name, which isn’t available in the DOS name space.

Primary name space information includes the following items:

NW_ENTRY_INFO contains primary name space information. The structure is filled in by NWGetNSInfo or NWScanNSEntryInfo. Requests for primary name space information are accompanied by a return information mask, which allows you to specify which portions of NW_ENTRY_INFO you want filled in. The following table shows which fields in NW_ENTRY_INFO are affected by bit flags in the return information mask.

Table 16-1 Return Information Mask

Value

Constant

Affected Fields

0x0001L

IM_ENTRY_NAME

nameLength

entryName

0x0002L

IM_SPACE_ALLOCATED

spaceAlloc

0x0004L

IM_ATTRIBUTES

attributes

flags

0x0008L

IM_SIZE

dataStreamSize

0x0010L

IM_TOTAL_SIZE

totalStreamSize

0x0020L

IM_EA

EADataSize

EAKeyCount

EAKeySize

0x0040L

IM_ARCHIVE

archiveTime

archiveDate

archiveID

0x0080L

IM_MODIFY

modifyTime

modifyDate

modifierID

lastAccessDate

0x0100L

IM_CREATION

creationTime

creationDate

creatorID

0x0200L

IM_OWNING_NAMESPACE

NSCreator

0x0400L

IM_DIRECTORY

dirEntNum

DosDirNum

volNumber

0x0800L

IM_RIGHTS

inheritedRightsMask

16.3.1 Primary Entry Information Functions

These functions deal with primary entry information for a name space.

NWAllocTempNSDirHandle2

Allocates a directory handle in a name space for the specified entry. The new directory handle doesn’t need to be in the same name space as the original entry.

NWDeleteNSEntry

Erases the specified files from the server.

NWGetLongName

Reads an entry’s name in the specified name space.

NWGetNSEntryInfo

Returns primary information for a name space entry.

NWNSRename

Renames a name space entry. Under NetWare® 4.x, 5.x, and 6.x, this function can rename an entry in a specific name space without affecting the name in other name spaces.

NWOpenCreateNSEntry

Creates a name space entry.

NWOpenDataStream

Opens or creates a data stream and returns a file handle to it.

NWOpenNSEntry

Opens a name space entry.

NWScanNSEntryInfo

Performs a file scan operation returning primary information for files matching the search mask.

NWSetLongName

Renames a name space entry.

NWSetNSEntryDOSInfo

Modifies the DOS information associated with an entry.