FS_RenameFile(
PIOREQ pir
)
A file is renamed through FS_RenameFile. This routine handles the Win32 function: MoveFile(); and int 21h functions: 17h, and 56h.
Search Attribute Values:
Any combination of the following attributes may be specified, causing those files to be included with normal files in the search. |
|
Value | Meaning |
---|---|
FILE_ATTRIBUTE_HIDDEN | Include hidden file in search. |
FILE_ATTRIBUTE_SYSTEM | Include system file in search. |
FILE_ATTRIBUTE_DIRECTORY | Include subdirectories in search.
The following attribute will only be specified by itself. It will not be combined with any of the other attributes. |
FILE_ATTRIBUTE_VOLUMELABEL | Search for volume label only. |
Path Parsing Flags:
The following path parsing flags are passed in. |
|
Value | Meaning |
FILE_FLAG_WILDCARDS | Wildcard characters present in pathname. |
FILE_FLAG_LONG_PATH | Path has a longname component. |
FILE_FLAG_KEEP_CASE | Preserve the case of the filename passed in when storing on disk. This also implies that this call should use longname semantics for its processing. |
FILE_FLAG_HAS_DOT | Filename component has a dot in its name. |
FILE_FLAG_IS_LFN | Filename component is a longname. |
Search Attribute Values:
Any combination of the following attributes may be specified, causing those files to be included with normal files in the search. |
|
Value | Meaning |
---|---|
FILE_ATTRIBUTE_HIDDEN | Include hidden file in search. |
FILE_ATTRIBUTE_SYSTEM | Include system file in search. |
FILE_ATTRIBUTE_DIRECTORY | Include subdirectories in search.
The following attribute will only be specified by itself. It will not be combined with any of the other attributes. |
FILE_ATTRIBUTE_VOLUMELABEL | Search for volume label only. |
Path Parsing Flags:
The following path parsing flags are passed in. |
|
Value | Meaning |
FILE_FLAG_WILDCARDS | Wildcard characters present in pathname. |
FILE_FLAG_LONG_PATH | Path has a longname component. |
FILE_FLAG_KEEP_CASE | Preserve the case of the filename passed in when storing on disk. This also implies that this call should use longname semantics for its processing. |
FILE_FLAG_HAS_DOT | Filename component has a dot in its name. |
FILE_FLAG_IS_LFN | Filename component is a longname. |
Tunnelling Structure: | |
Value | Meaning |
---|---|
tuni_bfContents | Specifies flags for the tunnelling information passed in. |
Tunnelling Info Flag Values: | |
Value | Meaning |
TUNI_CONTAINS_ALTNAME | Alternate unicode name is available in structure. This is the name to be used for the destination of the rename. |
TUNI_CONTAINS_CREATIONT | Creation time for file available. |
TUNI_CONTAINS_LASTACCESST | Last access time for file available. |
TUNI_CONTAINS_LASTWRITET | Last modification time for file available. |
Win32 FileTime Structure: | |
Value | Meaning |
---|---|
dwLowDateTime | Supplies the low double word of the time in Win32 format. |
dwHighDateTime | Supplies the low double word of the time in Win32 format. |
tuni_ftLastAccessTime | Supplies the last access time in the Win32 FileTime structure format described above. |
tuni_ftLastWriteTime | Supplies the last modification time in the Win32 FileTime structure format described above. |
ir_error | Returns status of the operation ( 0 if no error, errorcode otherwise ). |
If an FSD does not support long filenames on a volume and it gets a LFN API call on that volume, it should fail the call. Note that FS_RenameFile can also rename entire directory trees. Obviously, the FSD cannot validate if all paths of the renamed directory can be accessed, some subdirectories may not be accessible any more if the path becomes longer than the maximum allowed path. The FSD should check for cyclic directory renames and fail them. A rename of a file to itself should not failed, the FSD should just return success and do nothing. Local FSDs also need to honor the tunnelling information if they do not implement tunnelling on their own. Tunnelling is not supported on network drives. Therefore, network FSDs do not need to support this. Tunnelling is described separately in another section of this document.