gpt4 book ai didi

javascript - 将 StorageFile 端到端读入字符串的最简单方法?

转载 作者:行者123 更新时间:2023-11-27 22:51:21 24 4
gpt4 key购买 nike

我有一个 StorageFile 对象,我正在尝试读入字符串(用于调试目的)。最简单的方法是什么?

最佳答案

在 C# 中:

string text = await Windows.Storage.FileIO.ReadTextAsync(storageFile);

在 JavaScript 中:

var text = Windows.Storage.FileIO.readTextAsync(storageFile).then(file => do_stuff(file))

关于javascript - 将 StorageFile 端到端读入字符串的最简单方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38021880/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com