Browse Source

Mention save directories on more platforms;

bjorn 2 years ago
parent
commit
c534a6384d
2 changed files with 11 additions and 2 deletions
  1. 1 1
      api/init.lua
  2. 10 1
      api/lovr/filesystem/init.lua

+ 1 - 1
api/init.lua

@@ -7778,7 +7778,7 @@ return {
       description = "The `lovr.filesystem` module provides access to the filesystem.",
       description = "The `lovr.filesystem` module provides access to the filesystem.",
       key = "lovr.filesystem",
       key = "lovr.filesystem",
       enums = {},
       enums = {},
-      notes = "LÖVR programs can only write to a single directory, called the save directory.  The location of the save directory is platform-specific:\n\n<table>\n  <tr>\n    <td>Windows</td>\n    <td><code>C:\\Users\\&lt;user&gt;\\AppData\\Roaming\\LOVR\\&lt;identity&gt;</code></td>\n  </tr>\n  <tr>\n    <td>macOS</td>\n    <td><code>/Users/&lt;user&gt;/Library/Application Support/LOVR/&lt;identity&gt;</code></td>\n  </tr> </table>\n\n`<identity>` should be a unique identifier for your app.  It can be set either in `lovr.conf` or by using `lovr.filesystem.setIdentity`.\n\nAll filenames are relative to either the save directory or the directory containing the project source.  Files in the save directory take precedence over files in the project.",
+      notes = "LÖVR programs can only write to a single directory, called the save directory.  The location of the save directory is platform-specific:\n\n<table>\n  <tr>\n    <td>Windows</td>\n    <td><code>C:\\Users\\&lt;user&gt;\\AppData\\Roaming\\LOVR\\&lt;identity&gt;</code></td>\n  </tr>\n  <tr>\n    <td>macOS</td>\n    <td><code>/Users/&lt;user&gt;/Library/Application Support/LOVR/&lt;identity&gt;</code></td>\n  </tr>\n  <tr>\n    <td>Linux</td>\n    <td><code>/home/&lt;user&gt;/.local/share/LOVR/&lt;identity&gt;</code></td>\n  </tr>\n  <tr>\n    <td>Android</td>\n    <td><code>/sdcard/Android/data/<identity>/files</code></td>\n  </tr> </table>\n\n`<identity>` should be a unique identifier for your app.  It can be set either in `lovr.conf` or by using `lovr.filesystem.setIdentity`.  On Android, the identity can not be changed and will always be the package id, like `org.lovr.app`.\n\nAll filenames are relative to either the save directory or the directory containing the project source.  Files in the save directory take precedence over files in the project.",
       functions = {
       functions = {
         {
         {
           name = "append",
           name = "append",

+ 10 - 1
api/lovr/filesystem/init.lua

@@ -15,10 +15,19 @@ return {
         <td>macOS</td>
         <td>macOS</td>
         <td><code>/Users/&lt;user&gt;/Library/Application Support/LOVR/&lt;identity&gt;</code></td>
         <td><code>/Users/&lt;user&gt;/Library/Application Support/LOVR/&lt;identity&gt;</code></td>
       </tr>
       </tr>
+      <tr>
+        <td>Linux</td>
+        <td><code>/home/&lt;user&gt;/.local/share/LOVR/&lt;identity&gt;</code></td>
+      </tr>
+      <tr>
+        <td>Android</td>
+        <td><code>/sdcard/Android/data/<identity>/files</code></td>
+      </tr>
     </table>
     </table>
 
 
     `<identity>` should be a unique identifier for your app.  It can be set either in `lovr.conf` or
     `<identity>` should be a unique identifier for your app.  It can be set either in `lovr.conf` or
-    by using `lovr.filesystem.setIdentity`.
+    by using `lovr.filesystem.setIdentity`.  On Android, the identity can not be changed and will
+    always be the package id, like `org.lovr.app`.
 
 
     All filenames are relative to either the save directory or the directory containing the project
     All filenames are relative to either the save directory or the directory containing the project
     source.  Files in the save directory take precedence over files in the project.
     source.  Files in the save directory take precedence over files in the project.