Version: 2021.1
LanguageEnglish
  • C#

AsyncReadManager.GetFileInfo(string,FileInfoRequest*)

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Parameters

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.

Returns

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

Description

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.