FileSystemInfo FacetFileSystemInfo facet

命名空间:microsoft.graphNamespace: microsoft.graph

FileSystemInfo 资源包含设备本地文件系统所报告的项目本地版本的属性。和在本地设备上一样,此 facet 可用于指定项目的上次修改日期或创建日期。The FileSystemInfo resource contains properties that are reported by the device's local file system for the local version of an item. This facet can be used to specify the last modified date or created date of the item as it was on the local device.

可用于 driveItem 资源的 fileSystemInfo 属性。It is available on the fileSystemInfo property of driveItem resources.

JSON 表示形式JSON representation

{
  "createdDateTime" : "datetime",
  "lastAccessedDateTime": "datetime",
  "lastModifiedDateTime" : "datetime"
}

属性Properties

属性Property 类型Type 说明Description
createdDateTimecreatedDateTime DateTimeOffsetDateTimeOffset 在客户端创建文件时的 UTC 日期和时间。The UTC date and time the file was created on a client.
lastAccessedDateTimelastAccessedDateTime DateTimeOffsetDateTimeOffset 上次访问文件时的 UTC 日期和时间。The UTC date and time the file was last accessed. 仅可用于最近的文件列表Available for the recent file list only.
lastModifiedDateTimelastModifiedDateTime DateTimeOffsetDateTimeOffset 在客户端上次修改文件时的 UTC 日期和时间。The UTC date and time the file was last modified on a client.

注意Notes

来自 DriveItem 资源上同一属性的 createdDateTimelastModifiedDateTime 值有所不同。DriveItem 资源上的值是从服务中所见的创建和修改的日期和时间。FileSystemInfo 资源中存储的值由客户端提供。Values for createdDateTime and lastModifiedDateTime vary from the same properties on the DriveItem resource. The values on the DriveItem resource are the created and modified date and time as seen from the service. The values stored in the FileSystemInfo resource are provided by the client.

例如,如果星期一在设备上创建文件,但直到星期二才上载到服务,则上载文件的客户端应写入 fileSystemInfo facet,以包括星期一这一创建日期。检索项元数据时,项的创建日期将反映为星期二,但 fileSystemInfo facet 将显示星期一这一创建的原始创建日期。For example, if a file was created on the device on Monday, but not uploaded to the service until Tuesday, the client that uploads the file should write the fileSystemInfo facet to include the created date on Monday. When the item metadata is retrieved, the created date for the item will reflect Tuesday, but the fileSystemInfo facet will show the original created date on Monday.

这些属性为读/写。如果正在上载文件,并且知道这些字段的本地客户端值,则应该在请求中包括它们。These properties are read/write. If you are uploading a file and know the local client values for these fields, you should include them in the request.

如果文件内容已更新且未提供这些属性,lastModifiedDateTime 将自动重置为当前时间。If the file's content is updated and these properties are not provided, lastModifiedDateTime automatically resets to the current time.

注解Remarks

  • lastAccessedDateTime 不适用于 SharePoint Online 或 OneDrive for Business 中的项。lastAccessedDateTime is not available for items in SharePoint online or OneDrive for Business.

有关 DriveItem 上 facet 的详细信息,请参阅 DriveItemFor more information about the facets on a DriveItem, see DriveItem.