Jump to content

FS MOVE: Difference between revisions

From EDM2
Created page with "Moves (renames) the specified file or subdirectory. ==Syntax== FS_MOVE(pcdfsi, pcdfsd, pSrc, iSrcCurDirEnd, pDst, iDstCurDirEnd, flags) ==Parameters== ;pcdfsi :is a point..."
 
Ak120 (talk | contribs)
m wek
 
Line 1: Line 1:
Moves (renames) the specified file or subdirectory.  
{{DISPLAYTITLE:FS_MOVE}}
Moves (renames) the specified file or subdirectory.
 
==Syntax==
==Syntax==
  FS_MOVE(pcdfsi, pcdfsd, pSrc, iSrcCurDirEnd, pDst, iDstCurDirEnd, flags)
  FS_MOVE(pcdfsi, pcdfsd, pSrc, iSrcCurDirEnd, pDst, iDstCurDirEnd, flags)
==Parameters==
==Parameters==
;pcdfsi  
;pcdfsi:is a pointer to the file-system-independent working directory structure.
:is a pointer to the file-system-independent working directory structure.  
;pcdfsd:is a pointer to the file-system-dependent working directory structure.
;pSrc:is a pointer to the ASCIIZ name of the source file or directory.
:The FSD does not need to verify this pointer.
;iSrcCurDirEnd:is the index of the end of the current directory in pSrc.
:This is used to optimize FSD path processing. If iSrcCurDirEnd == -1 there is no current directory relevant to the source name text.
;pDst:is a pointer to the ASCIIZ name of the destination file or directory.
:The FSD does not need to verify this pointer.
;iDstCurDirEnd:is the index of the end of the current directory in pDst.
:This is used to optimize FSD path processing. If iDstCurDirEnd == -1 there is no current directory relevant to the destination name text.
;flags:indicates destination name type.
:Flags == 0x0040 indicates non-8.3 filename format. All other values are reserved.


;pcdfsd
==Calling Sequence==
:is a pointer to the file-system-dependent working directory structure . 
 
;pSrc
:is a pointer to the ASCIIZ name of the source file or directory. 
 
:The FSD does not need to verify this pointer. 
 
;iSrcCurDirEnd
:is the index of the end of the current directory in pSrc. 
 
:This is used to optimize FSD path processing. If iSrcCurDirEnd == -1 there is no current directory relevant to the source name text. 
 
;pDst
:is a pointer to the ASCIIZ name of the destination file or directory . 
 
The FSD does not need to verify this pointer. 
 
;iDstCurDirEnd
:is the index of the end of the current directory in pDst. 
 
:This is used to optimize FSD path processing. If iDstCurDirEnd == -1 there is no current directory relevant to the destination name text. 
 
;flags
:indicates destination name type. 
 
:Flags == 0x0040 indicates non-8.3 filename format. All other values are reserved.
==Returns==
==Sample==
Calling Sequence
<PRE>
<PRE>
int far pascal FS_MOVE(pcdfsi, pcdfsd, pSrc, iSrcCurDirEnd, pDst, iDstCurDirEnd, flags)
int far pascal FS_MOVE(pcdfsi, pcdfsd, pSrc, iSrcCurDirEnd, pDst, iDstCurDirEnd, flags)
Line 47: Line 31:
unsigned short flags;
unsigned short flags;
</PRE>
</PRE>
==Remarks==
==Remarks==
The file specified in filename should be moved to or renamed as the destination filename, if possible.  
The file specified in filename should be moved to or renamed as the destination filename, if possible.
 
Neither the source nor the destination filename may contain wildcard characters. 
 
FS_MOVE may be used to change the case in filenames. 


The non-8.3 filename format attribute in the directory entry for the destination name should be set according to the value in flags.  
Neither the source nor the destination filename may contain wildcard characters.


In the case of a subdirectory move, the system does the following checking : 
FS_MOVE may be used to change the case in filenames.


oNo files in this directory or its subdirectories are open.
The non-8.3 filename format attribute in the directory entry for the destination name should be set according to the value in flags.
oThis directory or any of its subdirectories is not the current directory for any process in the system.  


In addition, the system also checks for circularity in source and target directory names; that is, the source directory is not a prefix of the target directory .  
In the case of a subdirectory move, the system does the following checking:
*No files in this directory or its subdirectories are open.
*This directory or any of its subdirectories is not the current directory for any process in the system.
In addition, the system also checks for circularity in source and target directory names; that is, the source directory is not a prefix of the target directory.


Note:   OS/2 does not validate input parameters. Therefore, an FSD should call FSH_PROBEBUF where appropriate.  
;Note: OS/2 does not validate input parameters. Therefore, an FSD should call FSH_PROBEBUF where appropriate.


[[Category:IFS Interfaces]]
[[Category:IFS Interfaces]]
{{DISPLAYTITLE:FS_MOVE}}

Latest revision as of 03:14, 10 February 2020

Moves (renames) the specified file or subdirectory.

Syntax

FS_MOVE(pcdfsi, pcdfsd, pSrc, iSrcCurDirEnd, pDst, iDstCurDirEnd, flags)

Parameters

pcdfsi
is a pointer to the file-system-independent working directory structure.
pcdfsd
is a pointer to the file-system-dependent working directory structure.
pSrc
is a pointer to the ASCIIZ name of the source file or directory.
The FSD does not need to verify this pointer.
iSrcCurDirEnd
is the index of the end of the current directory in pSrc.
This is used to optimize FSD path processing. If iSrcCurDirEnd == -1 there is no current directory relevant to the source name text.
pDst
is a pointer to the ASCIIZ name of the destination file or directory.
The FSD does not need to verify this pointer.
iDstCurDirEnd
is the index of the end of the current directory in pDst.
This is used to optimize FSD path processing. If iDstCurDirEnd == -1 there is no current directory relevant to the destination name text.
flags
indicates destination name type.
Flags == 0x0040 indicates non-8.3 filename format. All other values are reserved.

Calling Sequence

int far pascal FS_MOVE(pcdfsi, pcdfsd, pSrc, iSrcCurDirEnd, pDst, iDstCurDirEnd, flags)

struct cdfsi far * pcdfsi;
struct cdfsd far * pcdfsd;
char far * pSrc;
unsigned short iSrcCurDirEnd;
char far * pDst;
unsigned short iDstCurDirEnd;
unsigned short flags;

Remarks

The file specified in filename should be moved to or renamed as the destination filename, if possible.

Neither the source nor the destination filename may contain wildcard characters.

FS_MOVE may be used to change the case in filenames.

The non-8.3 filename format attribute in the directory entry for the destination name should be set according to the value in flags.

In the case of a subdirectory move, the system does the following checking:

  • No files in this directory or its subdirectories are open.
  • This directory or any of its subdirectories is not the current directory for any process in the system.

In addition, the system also checks for circularity in source and target directory names; that is, the source directory is not a prefix of the target directory.

Note
OS/2 does not validate input parameters. Therefore, an FSD should call FSH_PROBEBUF where appropriate.