NWIntMoveDirEntry

Moves or renames a directory entry (file or directory) on the same server (same volume)

NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:File System

Syntax

   #include <nwdentry.h> 
   or 
   #include <nwcalls.h> 
    
   N_EXTERN_LIBRARY( NWCCODE )NWIntMoveDirEntry  ( 
      NWCONN_HANDLE        conn,  
      nuint8               searchAttrs,  
      NWDIR_HANDLE         srcDirHandle,  
      const nstr8 N_FAR   *srcPath,  
      NWDIR_HANDLE         dstDirHandle,  
      const nstr8 N_FAR   *dstPath,  
      nuint16              augmentFlag);
   

Delphi Syntax

   uses calwin32 
    
   Function NWIntMoveDirEntry 
     (conn : NWCONN_HANDLE; 
      searchAttrs : nuint8; 
      srcDirHandle : NWDIR_HANDLE; 
      const srcPath : pnstr8; 
      dstDirHandle : NWDIR_HANDLE; 
      const dstPath : pnstr8; 
      augmentFlag : nuint16 
   ) : NWCCODE;
   

Parameters

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 (not optional, cannot be zero).

srcPath

(IN) Points to the source path (wildcards are allowed).

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
  • nonzero = wildcards are augmented

Return Values

These are common return values; see Return Values (Return Values for C) for more information.

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 "All files in use"

0x898F

SOME_FILES_AFFECTED_READ_ONLY

0x8990

NO_FILES_AFFECTED_READ_ONLY "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

Remarks

To call NWIntMoveDirEntry, you 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 accepts paths relative to the directory handle, as well as full paths that include the volume. If full names are used, be careful that the maximum request length is not exceeded. Path names larger than 255 are not supported.

The searchAttrs parameter specifies the kind of entry to look for (hidden, system, etc.). If only the system bit is set, 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.

The searchAttrs parameter can have the following values:

C Value

Delphi Value

Value Name

0x00

$00

FA_NORMAL

0x01

$01

FA_READ_ONLY

0x02

$02

FA_HIDDEN

0x04

$04

FA_SYSTEM

0x08

$08

FA_EXECUTE_ONLY

0x10

$10

FA_DIRECTORY

0x20

$20

FA_NEEDS_ARCHIVED

0x80

$80

FA_SHAREABLE

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

The advantage of calling NWIntMoveDirEntry 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. Moving directory entries occurs only on the file system level. There is no physical transfer of data between the source and the destination.

NWIntMoveDirEntry will move files within the same volume only. If you attempt to move a file across different volumes, RENAMING_ACROSS_VOLUMES is returned.

NOTE:If the mac namespace has been enabled on the volume, do not use NWIntMoveDirEntry to move files or directories.

NCP Calls