no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Next revision | |||
— | en:docs:fapi:dosmove [2018/08/28 02:22] – created prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | This call moves a file object to another location and changes its name. | ||
+ | ==Syntax== | ||
+ | | ||
+ | |||
+ | ==Parameters== | ||
+ | ; | ||
+ | ; | ||
+ | ;Reserved (ULONG) - input : Reserved and must be set to zero. | ||
+ | |||
+ | ==Return Code== | ||
+ | rc (USHORT) - return | ||
+ | Return code descriptions are: | ||
+ | *0 | ||
+ | * 2 | ||
+ | * 3 | ||
+ | * 5 | ||
+ | * 17 | ||
+ | * 26 | ||
+ | * 32 | ||
+ | * 36 | ||
+ | * 87 | ||
+ | * 108 | ||
+ | * 206 | ||
+ | * 250 | ||
+ | * 251 | ||
+ | |||
+ | ==Remarks== | ||
+ | This call is often used to change only the name of a file or subdirectory, | ||
+ | |||
+ | If the paths specified are different, this allows the subdirectory location of the file object to be changed as well. If a drive is specified for the target, it must be the same as the one specified or implied by the source. | ||
+ | |||
+ | Any attempts to move a parent subdirectory to one of its descendant subdirectories are rejected, because a subdirectory cannot be both an ancestor and a descendant of the same subdirectory. Any attempts by a process to move the current subdirectory or any of its ancestors are also rejected. | ||
+ | |||
+ | Attributes (times and dates) of the source file object are moved to the target. If read-only files exist in the target path, they are not replaced. | ||
+ | |||
+ | DosQSysInfo is called during initialization by an application to determine the maximum path length allowed by OS/2. | ||
+ | |||
+ | DosMove can be used to change the case of a file on an FSD drive. The following example would change the name of the file to " | ||
+ | | ||
+ | |||
+ | ===Family API Considerations=== | ||
+ | Some options operate differently in the DOS mode than in the OS/2 mode. Therefore, the following restriction applies to DosMove when coding for the DOS mode: | ||
+ | |||
+ | File names passed to OldPathName and NewPathName are truncated by the system in the DOS mode only. The application must truncate all files passed to OldPathName and NewPathName in the OS/2 mode or an error code is returned. | ||
+ | |||
+ | ==Example Code== | ||
+ | ===C Binding=== | ||
+ | <PRE> | ||
+ | #define INCL_DOSFILEMGR | ||
+ | |||
+ | USHORT | ||
+ | |||
+ | PSZ OldPathName; | ||
+ | PSZ NewPathName; | ||
+ | ULONG 0; /* Reserved (must be zero) */ | ||
+ | |||
+ | USHORT | ||
+ | </ | ||
+ | |||
+ | ===MASM Binding=== | ||
+ | <PRE> | ||
+ | EXTRN DosMove:FAR | ||
+ | INCL_DOSFILEMGR | ||
+ | |||
+ | PUSH@ ASCIIZ | ||
+ | PUSH@ ASCIIZ | ||
+ | PUSH | ||
+ | CALL | ||
+ | |||
+ | Returns WORD | ||
+ | </ | ||
+ | |||
+ | === Note === | ||
+ | |||
+ | Text based on [[http:// | ||
+ | |||
+ | {{page> |