2014-12-23 106 views
0

我想在smartface appstudio的項目中包含一個文本文件。我把它放在哪裏?在資源文件夾或資產? FileStream無法在資源中讀取它(作爲可繪製項目)。任何想法?我應該在哪裏放置靜態文本文件?

var txtFile = new SMF.IO.FileStream(SMF.IO.applicationResources, "words.txt", SMF.IO.StreamType.read); 
txtFile.readToEnd(); 

回答

0

它沒有在當前版本的Smartface App Studio中實現。我也曾嘗試過。它是文件操作的第2階段。

您可以從互聯網上下載您的靜態文本文件並將其保存到本地存儲。並從那裏閱讀。我可以向你推薦這個想法。在下面檢查一些有用的鏈接

http://developer.smartface.io/hc/en-us/articles/203177557-File-Operations

http://developer.smartface.io/hc/en-us/articles/202153536-File-Download-Upload

+0

將是一個不錯的主意。它有點奇怪的情況。 –

相關問題