浏览代码

Added documentation for File Explorer shortcuts

Toby Chui 6 年之前
父节点
当前提交
c21ac00abf
共有 1 个文件被更改,包括 47 次插入1 次删除
  1. 47 1
      docs/lang/dev-en-HK/5.md

+ 47 - 1
docs/lang/dev-en-HK/5.md

@@ -10,6 +10,7 @@ In simple words, the file system of ArOZ Online System consists of the following
 - File Selector
 - File Selector
 - File Explorer Shortcuts
 - File Explorer Shortcuts
 - File Extension Default Opener
 - File Extension Default Opener
+- New Item Menu
 
 
 In this page, the functions and the API of the elements above will be introduced.
 In this page, the functions and the API of the elements above will be introduced.
 
 
@@ -292,5 +293,50 @@ function addFileFromSelector(fileData){
 ```
 ```
 
 
 ## File Explorer Shortcuts
 ## File Explorer Shortcuts
+The file explorer shortcuts is a set of ```.shortcut``` files located under user profile directory. The .shortcut files contains the following information, each data is seperated by a newline. (\n or \r\n depends on your host device operating system).
+
+```
+foldershrct
+{Name of the shortcut}
+{Path of the shortcut relative to /AOR}
+{icon of the shortcut, reference from system default css}
+```
+
+For example, here is a shortcut for the Audio module's uploads directory which points to ```Audio/uploads``` and with a music icon.
+
+```
+foldershrct
+Musics
+Audio/uploads
+music icon
+```
+
+
+To modify the default shortcuts, your WebApp can add files into the ```file_system/fshortcut``` directory. If your WebApp needs to add shortcuts to the file explorer for a particular user, you might need to access the local user configuration folder which is usually under ```/etc/AOB/users/{username}/SystemAOB/functions/file_system/fshortcut/*.shorcut```. 
+
+To get the full path of the user configuration directory, we recommend using the functions inside ```functions/users/userIsolation.php``` instead.
+
+```
+<?php
+//Assume your username is "alan"
+include_once("../SystemAOB/functions/user/userIsolation.php");
+$configs = glob(getUserDirectory() . "SystemAOB/functions/file_system/fshortcut/*.shortcut");
+var_dump($configs);
+?>
+
+Returned value
+
+C:\wamp\www\private\AOB\YourWebApp\index.php:5:
+array (size=4)
+  0 => string '/etc/AOB/users/alan/SystemAOB/functions/file_system/fshortcut/1555308037.shortcut' (length=77)
+  1 => string '/etc/AOB/users/alan/SystemAOB/functions/file_system/fshortcut/1555308041.shortcut' (length=77)
+  2 => string '/etc/AOB/users/alan/SystemAOB/functions/file_system/fshortcut/1557888190.shortcut' (length=77)
+  3 => string '/etc/AOB/users/alan/SystemAOB/functions/file_system/fshortcut/1557888194.shortcut' (length=77)
+```
+
+
+## File Extension Default Opener
+
+## New Item Menu
+
 
 
-## File Extension Default Opener