Version: 2022.3
public static Unity.IO.LowLevel.Unsafe.ReadHandle GetFileInfo (string filename, FileInfoResult* result);

参数

filename The name of the file to query.
result A struct that this function fills in with information about the file upon completion of this asynchronous request.

返回

ReadHandle A read handle that you can use to monitor the progress and status of this GetFileInfo command.

描述

Gets information about a file.

This function gets information about the specified file asynchronously without opening the file. On completion of the asynchronous operation, the result parameter's FileInfoResult.FileState member reports whether the file exists (FileState.Exists) or not (FileState.Absent). If the file exists, the result parameter's FileInfoResult.FileSize member reports the size of the file in bytes. If the file is absent, the size is reported as zero.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961