ソースを参照

Added note about file operations in HTML5

Björn Ritzl 6 年 前
コミット
a159eff6da
1 ファイル変更4 行追加0 行削除
  1. 4 0
      docs/en/manuals/html5.md

+ 4 - 0
docs/en/manuals/html5.md

@@ -218,3 +218,7 @@ If you create your custom template, you can specify extra parameters for the eng
     Function that is called if you can't download file after 'retry_count' attempts.
 */
 ```
+
+## File operations in HTML5
+
+HTML5 builds support file operations such as `sys.save()`, `sys.load()` and `io.open()` but the way these operations are handled internally is different from other platforms. When Javascript is run in a browser there is no real concept of a file system and local file access is blocked for security reasons. Instead Emscripten (and thus Defold) uses [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB), an in-browser database used to persistently store data, to create a virtual filesystem in the browser. The important difference from file system access on other platforms is that there can be a slight delay between writing to a file and the change actually being stored in the database. The browser developer console usually allows you to inspect the contents of the IndexedDB.