Kepler FileSystemTurboModule的接口。
这是一个接口,包含操作本地文件系统内容的基本方法。它使您能够查询文件系统、遍历文件系统、读取和写入文件。
扩展
KeplerTurboModule
属性
openFile
openFile:(path: string, mode: FileSystemTypes.OpenMode) => Promise<void>
使用指定模式打开文件。
removeFile
removeFile:(path: string) => Promise<void>
删除路径下的一个文件。
removeDir
removeDir:(path: string) => Promise<void>
删除路径下的一个目录。
removeDirAll
removeDirAll:(path: string) => Promise<void>
删除路径下的一个目录及其所有内容。
readFileAsString
readFileAsString:(path: string, encoding: string) => Promise<string>
将文本文件的全部内容读入一个字符串。
writeStringToFile
writeStringToFile:(path: string, content: string, encoding: string) => Promise<number>
将字符串写入一个文本文件。
getMetadata
getMetadata:(path: string, noFollow: boolean) => Promise<FileSystemTypes.Metadata>
获取指定路径对应的文件或符号链接的元数据。
getEntries
getEntries:(path: string) => Promise<string[]>
获取给定路径的目录条目。
exists
exists:(path: string) => Promise<boolean>
检查给定路径中是否存在文件或目录。

