FS_DeleteFile


FS_DeleteFile(
 PIOREQ pir
 )

A file is deleted through FS_DeleteFile. This routine handles the Win32 function: DeleteFile(); and INT 21h functions: 13h, and 41h.

ir_ppath

Supplies a pointer to the canonicalized unicode pathname to delete. Wildcards are allowed on the filename specification.

ir_rh

Supplies handle to disk volume or network resource which contains the file.

ir_attr

Supplies must-match and search attributes. Path parsing flags are also provided as advisory information for the FSDs.

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.

FILE_ATTRIBUTE_VOLUMELABEL

Search for volume label.

Must-Match Attribute Values:

The must-match attributes can be any of the following attributes.

Value

Meaning

FILE_ATTRIBUTE_READONLY

Match read-only files.

FILE_ATTRIBUTE_HIDDEN

Match hidden files.

FILE_ATTRIBUTE_SYSTEM

Match system files.

FILE_ATTRIBUTE_DIRECTORY

Match subdirectories.

FILE_ATTRIBUTE_ARCHIVE

Match archived files.

FILE_ATTRIBUTE_VOLUMELABEL

Match volume label.

Path Parsing Flags:

The following path parsing flags are passed in.

Value

Meaning

FILE_FLAG_WILDCARDS

Wildcard characters present in pathname.

FILE_FLAG_HAS_STAR

Path has the asterisk as a wildcard character.

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.


ir_uFname

Pointer to the case-preserved filename component in unicode.

ir_upath

Pointer to the unparsed user pathname in unicode.

ir_user

Supplies user id for this request.

ir_pid

Supplies process id for this request.

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 path that contains longnames, it should fail the call. The FSD should not attempt to truncate the pathname because there is a possibility of deleting the wrong file. Any truncation that needs to be done will be done by the IFS manager before the FSD is called. If an FSD does not support a wildcard delete, it must return an ERROR_INVALID_FUNCTION. The IFS manager watches for this errorcode and then proceeds to split the wildcard delete into a sequence of Find and Delete operations on non-wildcard filenames.