Version: 2023.1

File

class in UnityEngine.Windows

切换到手册

描述

提供文件操作的静态方法。

The UnityEngine.Windows.File class is available only for the Universal Windows Platform. It was recommended during the times in which the System.IO.File class was not available for the Universal Windows Platform. Now, the System.IO.File class is available for the Universal Windows Platform, and Unity recommends not using the UnityEngine.Windows.File class anymore, but the System.IO.File class instead.

静态函数

Delete删除指定文件。
Exists确定指定文件是否存在。
ReadAllBytes打开二进制文件,将文件内容读入一个字节数组中,然后关闭该文件。
WriteAllBytes创建新文件,将指定字节数组写入到此文件中,然后关闭该文件。如果目标文件已经存在,它将被覆盖。