Moves or renames a directory entry (file or directory) on the same server (same volume)
#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);
uses calwin32
Function NWIntMoveDirEntry
(conn : NWCONN_HANDLE;
searchAttrs : nuint8;
srcDirHandle : NWDIR_HANDLE;
const srcPath : pnstr8;
dstDirHandle : NWDIR_HANDLE;
const dstPath : pnstr8;
augmentFlag : nuint16
) : NWCCODE;
(IN) Specifies the NetWare server connection handle.
(IN) Specifies the attributes to use in searching for the source entries.
(IN) Specifies the directory handle for the source directory (not optional, cannot be zero).
(IN) Points to the source path (wildcards are allowed).
(IN) Specifies the NetWare directory handle for the destination directory.
(IN) Points to the path name to use for the destination entry.
(IN) Specifies if wildcards are augmented:
These are common return values; see Return Values (Return Values for C) for more information.
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:
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.