FS_FileAttributes


FS_FileAttributes(
 PIOREQ pir
 )

File attributes are set and retrieved and filesystem information is returned through FS_FileAttributes. This routine handles the Win32 functions: GetAttributesFile(), SetAttributesFile() and GetVolumeInfo(); and INT 21h function: 43h.

ir_ppath

Supplies a pointer to the canonicalized unicode pathname. Wildcards are not allowed on the pathname.

ir_rh

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

ir_flags

Supplies desired command type to perform.

Command Type Values:

One of the following types will be specified.

Value

Meaning

GET_ATTRIBUTES

Get the file attributes.

SET_ATTRIBUTES

Set the file attributes.

GET_ATTRIB_COMP_FILESIZE

Return the uncompressed size in bytes for the specified file or directory. Note that the root directory also has a valid physical size.

SET_ATTRIB_MODIFY_DATETIME

Set the last modification date for the file.

GET_ATTRIB_MODIFY_DATETIME

Get the last modification date for the file.

SET_ATTRIB_LAST_ACCESS_DATETIME

Set the last access date for the file.

GET_ATTRIB_LAST_ACCESS_DATETIME

Get the last access date for the file.

SET_ATTRIB_CREATION_DATETIME

Set the creation date for the file.

GET_ATTRIB_CREATION_DATETIME

Get the creation date for the file.


ir_attr

Supplies the path parsing flags. Also supplies the new file attribute on the SET_ATTRIBUTE command.

Attribute Values:

Any combination of the following attributes may be specified on the SET_ATTRIBUTES command.

Value

Meaning

FILE_ATTRIBUTE_READONLY

Read-Only file.

FILE_ATTRIBUTE_HIDDEN

Hidden file.

FILE_ATTRIBUTE_SYSTEM

System file.

FILE_ATTRIBUTE_ARCHIVE

Archive file.


Path Parsing Flags:

The following path parsing flags are passed in.

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.

Operation Type SET_ATTRIB_*:

ir_dostime

Supplies the current file date and time on all the get commands. The date and time is in DOS format. For GET_LAST_ACCESS_DATETIME, if only the date is supported, the time field should be set to 0.

ir_options

Supplies the 10 millisecond interval on the GET_ATTRIB_CREATION_DATETIME function.

ir_error

Returns status of the operation ( 0 if no error, errorcode otherwise ).

Operation Type GET_ATTRIBUTES:

Value

Meaning

ir_attr

Returns current attributes of the file on a GET_ATTRIBUTES command.

Operation Type GET_ATTRIB_COMP_FILESIZE:

ir_size

Returns the physical (uncompressed) size in bytes of the file or directory specified.

Operation Type GET_ATTRIB_*:

ir_dostime

Returns the current file date and time on all the get commands. The date and time is in DOS format. For SET_LAST_ACCESS_DATETIME, if only the date is supported, the time field should be set to 0.

ir_options

Returns the 10 millisecond interval on the SET_ATTRIB_CREATION_DATETIME function.


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. The function should not be failed if any of the date and time fields are not supported by a particular filesystem. A value of 0 should be returned in those date and time fields that are not supported.