#ifndef _NTIOAPI_H
typedef struct _FILE_RENAME_INFORMATION
{
BOOLEAN ReplaceIfExists;
HANDLE RootDirectory;
ULONG FileNameLength;
_Field_size_bytes_(FileNameLength) WCHAR FileName[1];
} FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
View code on GitHub
This structure is documented in Windows Driver Kit.
Structure FILE_RENAME_INFORMATION
is used as input buffer for function NtSetInformationFile
, called with FileRenameInformation
information class. Using this structure caller can rename file, or move it into other directory.
If set, and file with the same name as destination exist, it will be replaced. If no, STATUS_OBJECT_NAME_COLLISION
is returned.
Optional HANDLE
to parent directory for destination file.
Length of FileName
array, in bytes.
UNICODE string specifying destination file name. If RootDirectory
is NULL, it must contains full system path, or only destination file name for in-place rename operation.