NWSetLongName(3nw)


NWSetLongName -- renames entry in name space

Synopsis

   #include <nwnamspc.h> 
   or 
   #include <nwcalls.h> 
   

NWCCODE N_API NWSetLongName (NWCONN_HANDLE conn, nuint8 dirHandle, nuint8 namSpc, pnstr8 dstPath, nuint16 dstType, pnstr8 longName);

Description

The parameters are as follows:

conn
(IN) Specifies the NetWare server connection handle.

dirHandle
(IN) Specifies the directory handle of the parent directory.

namSpc
(IN) Specifies the name space of dstPath.

dstPath
(IN) Points to the name of the directory or file to rename.

dstType
(IN) Specifies the type (directory or file) that dstPath points to.

longName
(IN) Points to the new name (256 bytes maximum).

Return values

0x0000
SUCCESSFUL

0x8801
INVALID_CONNECTION

0x8998
VOLUME_DOES_NOT_EXIST

0x899B
BAD_DIRECTORY_HANDLE

0x899C
INVALID_PATH

0x899E
INVALID_FILENAME

Notices

dirHandle must point to the parent directory.

dstPath and longName must be valid names containing only one component. No relative paths should be used.

dstType can take on the following values:

0x8000
NW_TYPE_FILE

0x0010
NW_TYPE_SUBDIR
Resetting a filename in one name space resets the name in all name spaces. The shortening algorithm is used for the DOS and/or MAC name spaces, if appropriate.

AppleTalk Filing Protocol directory and file names (long names) contain from 1 to 31 characters. A long name is a Pascal string preceded by one byte which specifies the length of the name. Long names can contain any ASCII character between 1 and 255 except the colon (:) but cannot be terminated by a NULL character (character 0). NetWare servers automatically generate DOS-style file names (short names) for all AppleTalk Filing Protocol directories, as well as for created files and accessed files. NetWare servers maintain both the long name and the short name for each AppleTalk Filing Protocol directory and file.

NetWare uses the following conventions to convert AppleTalk Filing Protocol names to DOS names:


NOTE: If the first file in example 1 is subsequently deleted, a third file whose DOS name would have been identical to the first and second names is created in that directory. The third name is identical to the deleted first name and will not be appended with a decimal integer.

Services

Name Space

NCP calls

0x2222 23 17 Get File Server Information
0x2222 87 04 Rename Or Move A File Or Subdirectory

 
 0x2222   23   17   Get File Server 
                    Information 
 0x2222   87   04   Rename Or Move 
                    A File Or 
                    Subdirectory 

References

NWGetLongName(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.