NWIntMoveDirEntry(3nw)


NWIntMoveDirEntry -- moves or renames a directory entry (file or directory) on the same server in the DOS name space

Synopsis

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

NWCCODE N_API NWIntMoveDirEntry (NWCONN_HANDLE conn, nuint8 searchAttrs, NWDIR_HANDLE srcDirHandle, pnstr8 srcPath, NWDIR_HANDLE dstDirHandle, pnstr8 dstPath, nuint16 augmentFlag);

Description

The parameters are as follows:

conn
(IN) Specifies the NetWare server connection handle.

searchAttrs
(IN) Specifies the attributes to use in searching for the source entries.

srcDirHandle
(IN) Specifies the directory handle for the source directory. srcDirHandle is not optional; it cannot be zero.

srcPath
(IN) Points to the source path.

dstDirHandle
(IN) Specifies the NetWare directory handle for the destination directory.

dstPath
(IN) Points to the path name to use for the destination entry.

augmentFlag
(IN) Specifies if wildcards are augmented:

0 = wildcards are not augmented
non-zero = all wildcards are augmented

Return values

0x0000
SUCCESSFUL

0x8801
INVALID_CONNECTION

0x8987
WILD_CARDS_IN_CREATE_FILE_NAME

0x898B
NO_RENAME_PRIVILEGES

0x898D
SOME_FILES_AFFECTED_IN_USE

0x898E
NO_FILES_AFFECTED_IN_USE

(This means ``All files in use.'')

0x898F
SOME_FILES_AFFECTED_READ_ONLY

0x8990
NO_FILES_AFFECTED_READ_ONLY

(This means ``Read-only access to volume.'')

0x8991
SOME_FILES_RENAMED_NAME_EXISTS

0x8992
NO_FILES_RENAMED_NAME_EXISTS

0x899A
RENAMING_ACROSS_VOLUMES

0x899B
BAD_DIRECTORY_HANDLE

0x899C
INVALID_PATH

0x89A4
ERR_RENAME_DIR_INVALID

0x89FF
NO_FILES_FOUND_ERROR

Notices

NWIntMoveDirEntry is replacing NWMoveDirEntry.

To call NWIntMoveDirEntry, the client must have file modification privileges in both the source and the target directories.

The specified paths are relative to the specified directory handles. NetWare 3.11 and above accept paths relative to the directory handle, as well as full paths that include the volume. If full names are used, the caller must be careful that the maximum request length is not exceeded. Also, path names larger than 255 are not supported.

searchAttrs specifies the kind of entry to look for (hidden, system, etc.). In other words, if only the system bit is set in searchAttrs, all files are affected except hidden files. If only the hidden bit is set, all files are affected except system files. When neither bit is set (0x00), only files that are not designated either hidden or system are affected.

For NetWare 2.x, this function only works on files.

Constants used in searchAttrs follow:

C Value Value Name
0x00 FA_NORMAL
0x01 FA_READ_ONLY
0x02 FA_HIDDEN
0x04 FA_SYSTEM
0x08 FA_EXECUTE_ONLY
0x10 FA_DIRECTORY
0x20 FA_NEEDS_ARCHIVED
0x80 FA_SHAREABLE

 
 ----------------------------- 
| C Value|  Value Name       | 
|--------|-------------------| 
| 0x00   |  FA_NORMAL        | 
|--------|-------------------| 
| 0x01   |  FA_READ_ONLY     | 
|--------|-------------------| 
| 0x02   |  FA_HIDDEN        | 
|--------|-------------------| 
| 0x04   |  FA_SYSTEM        | 
|--------|-------------------| 
| 0x08   |  FA_EXECUTE_ONLY  | 
|--------|-------------------| 
| 0x10   |  FA_DIRECTORY     | 
|--------|-------------------| 
| 0x20   |  FA_NEEDS_ARCHIVED| 
|--------|-------------------| 
| 0x80   |  FA_SHAREABLE     | 
|--------|-------------------| 


NOTE: A file is designated hidden or system if its corresponding file attribute is set.

Wildcards are allowed in the name of the directory entry to move as indicated in srcPath.

The advantage of calling NWIntMoveDirEntry over DOS, OS/2, or other client APIs is its speed and efficiency. Since the move is within the server, the entry in the file system is simply deleted from the source and inserted in the destination. The moving of directory entries occurs only on the file system level. There is no physical transfer of data between the source and the destination.

Services

File Systems

NCP calls

0x2222 23 17
Get File Server Information

0x2222 69
Rename File

0x2222 87 04
Rename Or Move A File Or Subdirectory

30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.