您可以在快速入門:在JavaScript 中使用Promise 了解如何撰寫非同步應用程式。 ... 檔案存取範例會建立 sample.dat 檔案,並儲存傳回的storageFile 物件,像這樣:.
msdn.microsoft.com