Compartir a través de


2.2.8.4.3 SMB_SET_FILE_BASIC_INFO

This information level structure is used in TRANS2_SET_PATH_INFORMATION (section 2.2.6.7) and TRANS2_SET_FILE_INFORMATION (section 2.2.6.9) requests to set the following information for the file specified in the request.<182>

  • 64-bit versions of creation, access, and last write timestamps

  • Extended file attributes

     SMB_SET_FILE_BASIC_INFO 
       {
       FILETIME          CreationTime;
       FILETIME          LastAccessTime;
       FILETIME          LastWriteTime;
       FILETIME          ChangeTime;
       SMB_EXT_FILE_ATTR ExtFileAttributes;
       ULONG             Reserved;
       }
    

CreationTime: (8 bytes): A 64-bit unsigned integer that contains the time when the file was created. A valid time for this field is an integer greater than 0x0000000000000000. When setting file attributes, a value of 0x0000000000000000 indicates to the server that it MUST NOT change this attribute. When setting file attributes, a value of -1 (0xFFFFFFFFFFFFFFFF) indicates to the server that it MUST NOT change this attribute for all subsequent operations on the same file handle. This field MUST NOT be set to a value less than -1 (0xFFFFFFFFFFFFFFFF).

LastAccessTime: (8 bytes): A 64-bit unsigned integer that contains the last time that the file was accessed, in the format of a FILETIME structure. A valid time for this field is an integer greater than 0x0000000000000000. When setting file attributes, a value of 0x0000000000000000 indicates to the server that it MUST NOT change this attribute. When setting file attributes, a value of -1 (0xFFFFFFFFFFFFFFFF) indicates to the server that it MUST NOT change this attribute for all subsequent operations on the same file handle. This field MUST NOT be set to a value less than -1 (0xFFFFFFFFFFFFFFFF).

LastWriteTime: (8 bytes): A 64-bit unsigned integer that contains the last time that information was written to the file, in the format of a FILETIME structure. A valid time for this field is an integer greater than 0x0000000000000000. When setting file attributes, a value of 0x0000000000000000 indicates to the server that it MUST NOT change this attribute. When setting file attributes, a value of -1 (0xFFFFFFFFFFFFFFFF) indicates to the server that it MUST NOT change this attribute for all subsequent operations on the same file handle. This field MUST NOT be set to a value less than -1 (0xFFFFFFFFFFFFFFFF).

ChangeTime: (8 bytes): A 64-bit unsigned integer that contains the last time that the file was changed, in the format of a FILETIME structure. A valid time for this field is an integer greater than 0x0000000000000000. When setting file attributes, a value of 0x0000000000000000 indicates to the server that it MUST NOT change this attribute. When setting file attributes, a value of -1 (0xFFFFFFFFFFFFFFFF) indicates to the server that it MUST NOT change this attribute for all subsequent operations on the same file handle. This field MUST NOT be set to a value less than -1 (0xFFFFFFFFFFFFFFFF).

ExtFileAttributes: (4 bytes): This field contains the extended file attributes of the file, encoded as an SMB_EXT_FILE_ATTR data type (section 2.2.1.2.3).

Reserved: (4 bytes): A 32-bit reserved field that can be set to any value and MUST be ignored.