我在Titanium Appcelerator中創建HTML5類型的應用程序。我寫了代碼,以創建使用正確執行的鈦代碼創建文本文件,並創建文本文件在/Users/demoUser/Library/Developer/CoreSimulator/Devices/FE1CF0AC-D5BD-4FAB-9615-C58D80B5A9C6/data/Containers/Data/Application/40686DB0-BFB0-4D01-98BB-9E5758C4976D/Documents/file.txt
使用Titanium Appcelerator中的HTML代碼讀取寫入文本文件
現在我有一個html文件,即index.html,我在同一個應用程序中鈦webview加載。現在我想要在.html文件中創建的函數中訪問file.txt
的內容。
以前曾經從事過類似工作的人嗎?或者有關這方面的任何幫助或建議,將不勝感激。
感謝您的寶貴意見阿倫。但我想要的是,我想從html文件本身讀取位於applicationDataDirectory中的文件的內容。即我想在index.html自身中創建函數,它直接從applicationDataDirectory讀取內容。 –