FILE_DISPOSITION_INFORMATION structure (ntddk.h)

The FILE_DISPOSITION_INFORMATION structure is used as an argument to the ZwSetInformationFile routine.

Syntax

typedef struct _FILE_DISPOSITION_INFORMATION {
  BOOLEAN DeleteFile;
} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;

Members

DeleteFile

Indicates whether the operating system file should delete the file when the file is closed. Set this member to TRUE to delete the file when it is closed. Otherwise, set to FALSE. Setting this member to FALSE has no effect if the handle was opened with FILE_FLAG_DELETE_ON_CLOSE.

Remarks

The caller must have DELETE access to a given file in order to call ZwSetInformationFile with DeleteFile set to TRUE in this structure. Subsequently, the only legal operation by such a caller is to close the open file handle.

A file marked for deletion is not actually deleted until all open handles for the file object have been closed and the link count for the file is zero.

Requirements

Requirement Value
Header ntddk.h (include Ntddk.h, Ntifs.h)

See also

ZwClose

ZwSetInformationFile