From cc03ccf5e0e4be8bbf50bbdebe957c84be7f779b Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Fri, 13 Sep 2024 09:57:46 -0300 Subject: [PATCH] fix(fs): app scopes not properly enabling paths (#1774) --- .changes/fix-fs-app-scopes.md | 5 + .../src-tauri/gen/schemas/desktop-schema.json | 136 +++++++++--------- .../src-tauri/gen/schemas/mobile-schema.json | 136 +++++++++--------- plugins/fs/build.rs | 3 +- plugins/fs/guest-js/index.ts | 2 +- plugins/fs/permissions/app.toml | 114 +++++++++++++++ .../autogenerated/base-directories/app.toml | 82 ----------- .../base-directories/appcache.toml | 2 +- .../base-directories/appconfig.toml | 2 +- .../base-directories/appdata.toml | 2 +- .../base-directories/applocaldata.toml | 2 +- .../base-directories/applog.toml | 2 +- .../autogenerated/base-directories/audio.toml | 2 +- .../autogenerated/base-directories/cache.toml | 2 +- .../base-directories/config.toml | 2 +- .../autogenerated/base-directories/data.toml | 2 +- .../base-directories/desktop.toml | 2 +- .../base-directories/document.toml | 2 +- .../base-directories/download.toml | 2 +- .../autogenerated/base-directories/exe.toml | 2 +- .../autogenerated/base-directories/font.toml | 2 +- .../autogenerated/base-directories/home.toml | 2 +- .../base-directories/localdata.toml | 2 +- .../autogenerated/base-directories/log.toml | 2 +- .../base-directories/picture.toml | 2 +- .../base-directories/public.toml | 2 +- .../base-directories/resource.toml | 2 +- .../base-directories/runtime.toml | 2 +- .../autogenerated/base-directories/temp.toml | 2 +- .../base-directories/template.toml | 2 +- .../autogenerated/base-directories/video.toml | 2 +- .../fs/permissions/autogenerated/reference.md | 66 ++++----- .../permissions/create-app-specific-dirs.toml | 17 +-- .../read-app-specific-dirs-recursive.toml | 16 +-- plugins/fs/permissions/schemas/schema.json | 66 ++++----- plugins/shell/src/scope_entry.rs | 2 +- 36 files changed, 350 insertions(+), 343 deletions(-) create mode 100644 .changes/fix-fs-app-scopes.md create mode 100644 plugins/fs/permissions/app.toml delete mode 100644 plugins/fs/permissions/autogenerated/base-directories/app.toml diff --git a/.changes/fix-fs-app-scopes.md b/.changes/fix-fs-app-scopes.md new file mode 100644 index 00000000..48c31bd7 --- /dev/null +++ b/.changes/fix-fs-app-scopes.md @@ -0,0 +1,5 @@ +--- +"fs": patch +--- + +Fix `scope-app`, `scope-app-recursive` and `scope-index` not properly enabling the application paths. diff --git a/examples/api/src-tauri/gen/schemas/desktop-schema.json b/examples/api/src-tauri/gen/schemas/desktop-schema.json index aed6d630..a0b83284 100644 --- a/examples/api/src-tauri/gen/schemas/desktop-schema.json +++ b/examples/api/src-tauri/gen/schemas/desktop-schema.json @@ -150,42 +150,42 @@ ] }, { - "description": "fs:allow-app-meta -> This allows non-recursive read access to metadata of the `$APP` folder, including file listing and statistics.", + "description": "fs:allow-app-meta -> This allows non-recursive read access to metadata of the application folders, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-app-meta" ] }, { - "description": "fs:allow-app-meta-recursive -> This allows full recursive read access to metadata of the `$APP` folder, including file listing and statistics.", + "description": "fs:allow-app-meta-recursive -> This allows full recursive read access to metadata of the application folders, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-app-meta-recursive" ] }, { - "description": "fs:allow-app-read -> This allows non-recursive read access to the `$APP` folder.", + "description": "fs:allow-app-read -> This allows non-recursive read access to the application folders.", "type": "string", "enum": [ "fs:allow-app-read" ] }, { - "description": "fs:allow-app-read-recursive -> This allows full recursive read access to the complete `$APP` folder, files and subdirectories.", + "description": "fs:allow-app-read-recursive -> This allows full recursive read access to the complete application folders, files and subdirectories.", "type": "string", "enum": [ "fs:allow-app-read-recursive" ] }, { - "description": "fs:allow-app-write -> This allows non-recursive write access to the `$APP` folder.", + "description": "fs:allow-app-write -> This allows non-recursive write access to the application folders.", "type": "string", "enum": [ "fs:allow-app-write" ] }, { - "description": "fs:allow-app-write-recursive -> This allows full recursive write access to the complete `$APP` folder, files and subdirectories.", + "description": "fs:allow-app-write-recursive -> This allows full recursive write access to the complete application folders, files and subdirectories.", "type": "string", "enum": [ "fs:allow-app-write-recursive" @@ -1606,28 +1606,28 @@ ] }, { - "description": "fs:scope-app -> This scope permits access to all files and list content of top level directories in the `$APP`folder.", + "description": "fs:scope-app -> This scope permits access to all files and list content of top level directories in the application folders.", "type": "string", "enum": [ "fs:scope-app" ] }, { - "description": "fs:scope-app-index -> This scope permits to list all files and folders in the `$APP`folder.", + "description": "fs:scope-app-index -> This scope permits to list all files and folders in the application directories.", "type": "string", "enum": [ "fs:scope-app-index" ] }, { - "description": "fs:scope-app-recursive -> This scope permits recursive access to the complete `$APP` folder, including sub directories and files.", + "description": "fs:scope-app-recursive -> This scope permits recursive access to the complete application folders, including sub directories and files.", "type": "string", "enum": [ "fs:scope-app-recursive" ] }, { - "description": "fs:scope-appcache -> This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder.", + "description": "fs:scope-appcache -> This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder.", "type": "string", "enum": [ "fs:scope-appcache" @@ -1648,7 +1648,7 @@ ] }, { - "description": "fs:scope-appconfig -> This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder.", + "description": "fs:scope-appconfig -> This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder.", "type": "string", "enum": [ "fs:scope-appconfig" @@ -1669,7 +1669,7 @@ ] }, { - "description": "fs:scope-appdata -> This scope permits access to all files and list content of top level directories in the `$APPDATA`folder.", + "description": "fs:scope-appdata -> This scope permits access to all files and list content of top level directories in the `$APPDATA` folder.", "type": "string", "enum": [ "fs:scope-appdata" @@ -1690,7 +1690,7 @@ ] }, { - "description": "fs:scope-applocaldata -> This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder.", + "description": "fs:scope-applocaldata -> This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder.", "type": "string", "enum": [ "fs:scope-applocaldata" @@ -1711,7 +1711,7 @@ ] }, { - "description": "fs:scope-applog -> This scope permits access to all files and list content of top level directories in the `$APPLOG`folder.", + "description": "fs:scope-applog -> This scope permits access to all files and list content of top level directories in the `$APPLOG` folder.", "type": "string", "enum": [ "fs:scope-applog" @@ -1732,7 +1732,7 @@ ] }, { - "description": "fs:scope-audio -> This scope permits access to all files and list content of top level directories in the `$AUDIO`folder.", + "description": "fs:scope-audio -> This scope permits access to all files and list content of top level directories in the `$AUDIO` folder.", "type": "string", "enum": [ "fs:scope-audio" @@ -1753,7 +1753,7 @@ ] }, { - "description": "fs:scope-cache -> This scope permits access to all files and list content of top level directories in the `$CACHE`folder.", + "description": "fs:scope-cache -> This scope permits access to all files and list content of top level directories in the `$CACHE` folder.", "type": "string", "enum": [ "fs:scope-cache" @@ -1774,7 +1774,7 @@ ] }, { - "description": "fs:scope-config -> This scope permits access to all files and list content of top level directories in the `$CONFIG`folder.", + "description": "fs:scope-config -> This scope permits access to all files and list content of top level directories in the `$CONFIG` folder.", "type": "string", "enum": [ "fs:scope-config" @@ -1795,7 +1795,7 @@ ] }, { - "description": "fs:scope-data -> This scope permits access to all files and list content of top level directories in the `$DATA`folder.", + "description": "fs:scope-data -> This scope permits access to all files and list content of top level directories in the `$DATA` folder.", "type": "string", "enum": [ "fs:scope-data" @@ -1816,7 +1816,7 @@ ] }, { - "description": "fs:scope-desktop -> This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder.", + "description": "fs:scope-desktop -> This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder.", "type": "string", "enum": [ "fs:scope-desktop" @@ -1837,7 +1837,7 @@ ] }, { - "description": "fs:scope-document -> This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder.", + "description": "fs:scope-document -> This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder.", "type": "string", "enum": [ "fs:scope-document" @@ -1858,7 +1858,7 @@ ] }, { - "description": "fs:scope-download -> This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder.", + "description": "fs:scope-download -> This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder.", "type": "string", "enum": [ "fs:scope-download" @@ -1879,7 +1879,7 @@ ] }, { - "description": "fs:scope-exe -> This scope permits access to all files and list content of top level directories in the `$EXE`folder.", + "description": "fs:scope-exe -> This scope permits access to all files and list content of top level directories in the `$EXE` folder.", "type": "string", "enum": [ "fs:scope-exe" @@ -1900,7 +1900,7 @@ ] }, { - "description": "fs:scope-font -> This scope permits access to all files and list content of top level directories in the `$FONT`folder.", + "description": "fs:scope-font -> This scope permits access to all files and list content of top level directories in the `$FONT` folder.", "type": "string", "enum": [ "fs:scope-font" @@ -1921,7 +1921,7 @@ ] }, { - "description": "fs:scope-home -> This scope permits access to all files and list content of top level directories in the `$HOME`folder.", + "description": "fs:scope-home -> This scope permits access to all files and list content of top level directories in the `$HOME` folder.", "type": "string", "enum": [ "fs:scope-home" @@ -1942,7 +1942,7 @@ ] }, { - "description": "fs:scope-localdata -> This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder.", + "description": "fs:scope-localdata -> This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder.", "type": "string", "enum": [ "fs:scope-localdata" @@ -1963,7 +1963,7 @@ ] }, { - "description": "fs:scope-log -> This scope permits access to all files and list content of top level directories in the `$LOG`folder.", + "description": "fs:scope-log -> This scope permits access to all files and list content of top level directories in the `$LOG` folder.", "type": "string", "enum": [ "fs:scope-log" @@ -1984,7 +1984,7 @@ ] }, { - "description": "fs:scope-picture -> This scope permits access to all files and list content of top level directories in the `$PICTURE`folder.", + "description": "fs:scope-picture -> This scope permits access to all files and list content of top level directories in the `$PICTURE` folder.", "type": "string", "enum": [ "fs:scope-picture" @@ -2005,7 +2005,7 @@ ] }, { - "description": "fs:scope-public -> This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder.", + "description": "fs:scope-public -> This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder.", "type": "string", "enum": [ "fs:scope-public" @@ -2026,7 +2026,7 @@ ] }, { - "description": "fs:scope-resource -> This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder.", + "description": "fs:scope-resource -> This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder.", "type": "string", "enum": [ "fs:scope-resource" @@ -2047,7 +2047,7 @@ ] }, { - "description": "fs:scope-runtime -> This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder.", + "description": "fs:scope-runtime -> This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder.", "type": "string", "enum": [ "fs:scope-runtime" @@ -2068,7 +2068,7 @@ ] }, { - "description": "fs:scope-temp -> This scope permits access to all files and list content of top level directories in the `$TEMP`folder.", + "description": "fs:scope-temp -> This scope permits access to all files and list content of top level directories in the `$TEMP` folder.", "type": "string", "enum": [ "fs:scope-temp" @@ -2089,7 +2089,7 @@ ] }, { - "description": "fs:scope-template -> This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder.", + "description": "fs:scope-template -> This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder.", "type": "string", "enum": [ "fs:scope-template" @@ -2110,7 +2110,7 @@ ] }, { - "description": "fs:scope-video -> This scope permits access to all files and list content of top level directories in the `$VIDEO`folder.", + "description": "fs:scope-video -> This scope permits access to all files and list content of top level directories in the `$VIDEO` folder.", "type": "string", "enum": [ "fs:scope-video" @@ -2427,7 +2427,7 @@ ] }, "cmd": { - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", "type": "string" }, "name": { @@ -2462,7 +2462,7 @@ ] }, "cmd": { - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", "type": "string" }, "name": { @@ -4641,42 +4641,42 @@ ] }, { - "description": "fs:allow-app-meta -> This allows non-recursive read access to metadata of the `$APP` folder, including file listing and statistics.", + "description": "fs:allow-app-meta -> This allows non-recursive read access to metadata of the application folders, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-app-meta" ] }, { - "description": "fs:allow-app-meta-recursive -> This allows full recursive read access to metadata of the `$APP` folder, including file listing and statistics.", + "description": "fs:allow-app-meta-recursive -> This allows full recursive read access to metadata of the application folders, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-app-meta-recursive" ] }, { - "description": "fs:allow-app-read -> This allows non-recursive read access to the `$APP` folder.", + "description": "fs:allow-app-read -> This allows non-recursive read access to the application folders.", "type": "string", "enum": [ "fs:allow-app-read" ] }, { - "description": "fs:allow-app-read-recursive -> This allows full recursive read access to the complete `$APP` folder, files and subdirectories.", + "description": "fs:allow-app-read-recursive -> This allows full recursive read access to the complete application folders, files and subdirectories.", "type": "string", "enum": [ "fs:allow-app-read-recursive" ] }, { - "description": "fs:allow-app-write -> This allows non-recursive write access to the `$APP` folder.", + "description": "fs:allow-app-write -> This allows non-recursive write access to the application folders.", "type": "string", "enum": [ "fs:allow-app-write" ] }, { - "description": "fs:allow-app-write-recursive -> This allows full recursive write access to the complete `$APP` folder, files and subdirectories.", + "description": "fs:allow-app-write-recursive -> This allows full recursive write access to the complete application folders, files and subdirectories.", "type": "string", "enum": [ "fs:allow-app-write-recursive" @@ -6104,28 +6104,28 @@ ] }, { - "description": "fs:scope-app -> This scope permits access to all files and list content of top level directories in the `$APP`folder.", + "description": "fs:scope-app -> This scope permits access to all files and list content of top level directories in the application folders.", "type": "string", "enum": [ "fs:scope-app" ] }, { - "description": "fs:scope-app-index -> This scope permits to list all files and folders in the `$APP`folder.", + "description": "fs:scope-app-index -> This scope permits to list all files and folders in the application directories.", "type": "string", "enum": [ "fs:scope-app-index" ] }, { - "description": "fs:scope-app-recursive -> This scope permits recursive access to the complete `$APP` folder, including sub directories and files.", + "description": "fs:scope-app-recursive -> This scope permits recursive access to the complete application folders, including sub directories and files.", "type": "string", "enum": [ "fs:scope-app-recursive" ] }, { - "description": "fs:scope-appcache -> This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder.", + "description": "fs:scope-appcache -> This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder.", "type": "string", "enum": [ "fs:scope-appcache" @@ -6146,7 +6146,7 @@ ] }, { - "description": "fs:scope-appconfig -> This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder.", + "description": "fs:scope-appconfig -> This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder.", "type": "string", "enum": [ "fs:scope-appconfig" @@ -6167,7 +6167,7 @@ ] }, { - "description": "fs:scope-appdata -> This scope permits access to all files and list content of top level directories in the `$APPDATA`folder.", + "description": "fs:scope-appdata -> This scope permits access to all files and list content of top level directories in the `$APPDATA` folder.", "type": "string", "enum": [ "fs:scope-appdata" @@ -6188,7 +6188,7 @@ ] }, { - "description": "fs:scope-applocaldata -> This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder.", + "description": "fs:scope-applocaldata -> This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder.", "type": "string", "enum": [ "fs:scope-applocaldata" @@ -6209,7 +6209,7 @@ ] }, { - "description": "fs:scope-applog -> This scope permits access to all files and list content of top level directories in the `$APPLOG`folder.", + "description": "fs:scope-applog -> This scope permits access to all files and list content of top level directories in the `$APPLOG` folder.", "type": "string", "enum": [ "fs:scope-applog" @@ -6230,7 +6230,7 @@ ] }, { - "description": "fs:scope-audio -> This scope permits access to all files and list content of top level directories in the `$AUDIO`folder.", + "description": "fs:scope-audio -> This scope permits access to all files and list content of top level directories in the `$AUDIO` folder.", "type": "string", "enum": [ "fs:scope-audio" @@ -6251,7 +6251,7 @@ ] }, { - "description": "fs:scope-cache -> This scope permits access to all files and list content of top level directories in the `$CACHE`folder.", + "description": "fs:scope-cache -> This scope permits access to all files and list content of top level directories in the `$CACHE` folder.", "type": "string", "enum": [ "fs:scope-cache" @@ -6272,7 +6272,7 @@ ] }, { - "description": "fs:scope-config -> This scope permits access to all files and list content of top level directories in the `$CONFIG`folder.", + "description": "fs:scope-config -> This scope permits access to all files and list content of top level directories in the `$CONFIG` folder.", "type": "string", "enum": [ "fs:scope-config" @@ -6293,7 +6293,7 @@ ] }, { - "description": "fs:scope-data -> This scope permits access to all files and list content of top level directories in the `$DATA`folder.", + "description": "fs:scope-data -> This scope permits access to all files and list content of top level directories in the `$DATA` folder.", "type": "string", "enum": [ "fs:scope-data" @@ -6314,7 +6314,7 @@ ] }, { - "description": "fs:scope-desktop -> This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder.", + "description": "fs:scope-desktop -> This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder.", "type": "string", "enum": [ "fs:scope-desktop" @@ -6335,7 +6335,7 @@ ] }, { - "description": "fs:scope-document -> This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder.", + "description": "fs:scope-document -> This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder.", "type": "string", "enum": [ "fs:scope-document" @@ -6356,7 +6356,7 @@ ] }, { - "description": "fs:scope-download -> This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder.", + "description": "fs:scope-download -> This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder.", "type": "string", "enum": [ "fs:scope-download" @@ -6377,7 +6377,7 @@ ] }, { - "description": "fs:scope-exe -> This scope permits access to all files and list content of top level directories in the `$EXE`folder.", + "description": "fs:scope-exe -> This scope permits access to all files and list content of top level directories in the `$EXE` folder.", "type": "string", "enum": [ "fs:scope-exe" @@ -6398,7 +6398,7 @@ ] }, { - "description": "fs:scope-font -> This scope permits access to all files and list content of top level directories in the `$FONT`folder.", + "description": "fs:scope-font -> This scope permits access to all files and list content of top level directories in the `$FONT` folder.", "type": "string", "enum": [ "fs:scope-font" @@ -6419,7 +6419,7 @@ ] }, { - "description": "fs:scope-home -> This scope permits access to all files and list content of top level directories in the `$HOME`folder.", + "description": "fs:scope-home -> This scope permits access to all files and list content of top level directories in the `$HOME` folder.", "type": "string", "enum": [ "fs:scope-home" @@ -6440,7 +6440,7 @@ ] }, { - "description": "fs:scope-localdata -> This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder.", + "description": "fs:scope-localdata -> This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder.", "type": "string", "enum": [ "fs:scope-localdata" @@ -6461,7 +6461,7 @@ ] }, { - "description": "fs:scope-log -> This scope permits access to all files and list content of top level directories in the `$LOG`folder.", + "description": "fs:scope-log -> This scope permits access to all files and list content of top level directories in the `$LOG` folder.", "type": "string", "enum": [ "fs:scope-log" @@ -6482,7 +6482,7 @@ ] }, { - "description": "fs:scope-picture -> This scope permits access to all files and list content of top level directories in the `$PICTURE`folder.", + "description": "fs:scope-picture -> This scope permits access to all files and list content of top level directories in the `$PICTURE` folder.", "type": "string", "enum": [ "fs:scope-picture" @@ -6503,7 +6503,7 @@ ] }, { - "description": "fs:scope-public -> This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder.", + "description": "fs:scope-public -> This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder.", "type": "string", "enum": [ "fs:scope-public" @@ -6524,7 +6524,7 @@ ] }, { - "description": "fs:scope-resource -> This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder.", + "description": "fs:scope-resource -> This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder.", "type": "string", "enum": [ "fs:scope-resource" @@ -6545,7 +6545,7 @@ ] }, { - "description": "fs:scope-runtime -> This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder.", + "description": "fs:scope-runtime -> This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder.", "type": "string", "enum": [ "fs:scope-runtime" @@ -6566,7 +6566,7 @@ ] }, { - "description": "fs:scope-temp -> This scope permits access to all files and list content of top level directories in the `$TEMP`folder.", + "description": "fs:scope-temp -> This scope permits access to all files and list content of top level directories in the `$TEMP` folder.", "type": "string", "enum": [ "fs:scope-temp" @@ -6587,7 +6587,7 @@ ] }, { - "description": "fs:scope-template -> This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder.", + "description": "fs:scope-template -> This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder.", "type": "string", "enum": [ "fs:scope-template" @@ -6608,7 +6608,7 @@ ] }, { - "description": "fs:scope-video -> This scope permits access to all files and list content of top level directories in the `$VIDEO`folder.", + "description": "fs:scope-video -> This scope permits access to all files and list content of top level directories in the `$VIDEO` folder.", "type": "string", "enum": [ "fs:scope-video" diff --git a/examples/api/src-tauri/gen/schemas/mobile-schema.json b/examples/api/src-tauri/gen/schemas/mobile-schema.json index 1cce6dd1..82c9e0ca 100644 --- a/examples/api/src-tauri/gen/schemas/mobile-schema.json +++ b/examples/api/src-tauri/gen/schemas/mobile-schema.json @@ -150,42 +150,42 @@ ] }, { - "description": "fs:allow-app-meta -> This allows non-recursive read access to metadata of the `$APP` folder, including file listing and statistics.", + "description": "fs:allow-app-meta -> This allows non-recursive read access to metadata of the application folders, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-app-meta" ] }, { - "description": "fs:allow-app-meta-recursive -> This allows full recursive read access to metadata of the `$APP` folder, including file listing and statistics.", + "description": "fs:allow-app-meta-recursive -> This allows full recursive read access to metadata of the application folders, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-app-meta-recursive" ] }, { - "description": "fs:allow-app-read -> This allows non-recursive read access to the `$APP` folder.", + "description": "fs:allow-app-read -> This allows non-recursive read access to the application folders.", "type": "string", "enum": [ "fs:allow-app-read" ] }, { - "description": "fs:allow-app-read-recursive -> This allows full recursive read access to the complete `$APP` folder, files and subdirectories.", + "description": "fs:allow-app-read-recursive -> This allows full recursive read access to the complete application folders, files and subdirectories.", "type": "string", "enum": [ "fs:allow-app-read-recursive" ] }, { - "description": "fs:allow-app-write -> This allows non-recursive write access to the `$APP` folder.", + "description": "fs:allow-app-write -> This allows non-recursive write access to the application folders.", "type": "string", "enum": [ "fs:allow-app-write" ] }, { - "description": "fs:allow-app-write-recursive -> This allows full recursive write access to the complete `$APP` folder, files and subdirectories.", + "description": "fs:allow-app-write-recursive -> This allows full recursive write access to the complete application folders, files and subdirectories.", "type": "string", "enum": [ "fs:allow-app-write-recursive" @@ -1606,28 +1606,28 @@ ] }, { - "description": "fs:scope-app -> This scope permits access to all files and list content of top level directories in the `$APP`folder.", + "description": "fs:scope-app -> This scope permits access to all files and list content of top level directories in the application folders.", "type": "string", "enum": [ "fs:scope-app" ] }, { - "description": "fs:scope-app-index -> This scope permits to list all files and folders in the `$APP`folder.", + "description": "fs:scope-app-index -> This scope permits to list all files and folders in the application directories.", "type": "string", "enum": [ "fs:scope-app-index" ] }, { - "description": "fs:scope-app-recursive -> This scope permits recursive access to the complete `$APP` folder, including sub directories and files.", + "description": "fs:scope-app-recursive -> This scope permits recursive access to the complete application folders, including sub directories and files.", "type": "string", "enum": [ "fs:scope-app-recursive" ] }, { - "description": "fs:scope-appcache -> This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder.", + "description": "fs:scope-appcache -> This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder.", "type": "string", "enum": [ "fs:scope-appcache" @@ -1648,7 +1648,7 @@ ] }, { - "description": "fs:scope-appconfig -> This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder.", + "description": "fs:scope-appconfig -> This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder.", "type": "string", "enum": [ "fs:scope-appconfig" @@ -1669,7 +1669,7 @@ ] }, { - "description": "fs:scope-appdata -> This scope permits access to all files and list content of top level directories in the `$APPDATA`folder.", + "description": "fs:scope-appdata -> This scope permits access to all files and list content of top level directories in the `$APPDATA` folder.", "type": "string", "enum": [ "fs:scope-appdata" @@ -1690,7 +1690,7 @@ ] }, { - "description": "fs:scope-applocaldata -> This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder.", + "description": "fs:scope-applocaldata -> This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder.", "type": "string", "enum": [ "fs:scope-applocaldata" @@ -1711,7 +1711,7 @@ ] }, { - "description": "fs:scope-applog -> This scope permits access to all files and list content of top level directories in the `$APPLOG`folder.", + "description": "fs:scope-applog -> This scope permits access to all files and list content of top level directories in the `$APPLOG` folder.", "type": "string", "enum": [ "fs:scope-applog" @@ -1732,7 +1732,7 @@ ] }, { - "description": "fs:scope-audio -> This scope permits access to all files and list content of top level directories in the `$AUDIO`folder.", + "description": "fs:scope-audio -> This scope permits access to all files and list content of top level directories in the `$AUDIO` folder.", "type": "string", "enum": [ "fs:scope-audio" @@ -1753,7 +1753,7 @@ ] }, { - "description": "fs:scope-cache -> This scope permits access to all files and list content of top level directories in the `$CACHE`folder.", + "description": "fs:scope-cache -> This scope permits access to all files and list content of top level directories in the `$CACHE` folder.", "type": "string", "enum": [ "fs:scope-cache" @@ -1774,7 +1774,7 @@ ] }, { - "description": "fs:scope-config -> This scope permits access to all files and list content of top level directories in the `$CONFIG`folder.", + "description": "fs:scope-config -> This scope permits access to all files and list content of top level directories in the `$CONFIG` folder.", "type": "string", "enum": [ "fs:scope-config" @@ -1795,7 +1795,7 @@ ] }, { - "description": "fs:scope-data -> This scope permits access to all files and list content of top level directories in the `$DATA`folder.", + "description": "fs:scope-data -> This scope permits access to all files and list content of top level directories in the `$DATA` folder.", "type": "string", "enum": [ "fs:scope-data" @@ -1816,7 +1816,7 @@ ] }, { - "description": "fs:scope-desktop -> This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder.", + "description": "fs:scope-desktop -> This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder.", "type": "string", "enum": [ "fs:scope-desktop" @@ -1837,7 +1837,7 @@ ] }, { - "description": "fs:scope-document -> This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder.", + "description": "fs:scope-document -> This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder.", "type": "string", "enum": [ "fs:scope-document" @@ -1858,7 +1858,7 @@ ] }, { - "description": "fs:scope-download -> This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder.", + "description": "fs:scope-download -> This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder.", "type": "string", "enum": [ "fs:scope-download" @@ -1879,7 +1879,7 @@ ] }, { - "description": "fs:scope-exe -> This scope permits access to all files and list content of top level directories in the `$EXE`folder.", + "description": "fs:scope-exe -> This scope permits access to all files and list content of top level directories in the `$EXE` folder.", "type": "string", "enum": [ "fs:scope-exe" @@ -1900,7 +1900,7 @@ ] }, { - "description": "fs:scope-font -> This scope permits access to all files and list content of top level directories in the `$FONT`folder.", + "description": "fs:scope-font -> This scope permits access to all files and list content of top level directories in the `$FONT` folder.", "type": "string", "enum": [ "fs:scope-font" @@ -1921,7 +1921,7 @@ ] }, { - "description": "fs:scope-home -> This scope permits access to all files and list content of top level directories in the `$HOME`folder.", + "description": "fs:scope-home -> This scope permits access to all files and list content of top level directories in the `$HOME` folder.", "type": "string", "enum": [ "fs:scope-home" @@ -1942,7 +1942,7 @@ ] }, { - "description": "fs:scope-localdata -> This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder.", + "description": "fs:scope-localdata -> This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder.", "type": "string", "enum": [ "fs:scope-localdata" @@ -1963,7 +1963,7 @@ ] }, { - "description": "fs:scope-log -> This scope permits access to all files and list content of top level directories in the `$LOG`folder.", + "description": "fs:scope-log -> This scope permits access to all files and list content of top level directories in the `$LOG` folder.", "type": "string", "enum": [ "fs:scope-log" @@ -1984,7 +1984,7 @@ ] }, { - "description": "fs:scope-picture -> This scope permits access to all files and list content of top level directories in the `$PICTURE`folder.", + "description": "fs:scope-picture -> This scope permits access to all files and list content of top level directories in the `$PICTURE` folder.", "type": "string", "enum": [ "fs:scope-picture" @@ -2005,7 +2005,7 @@ ] }, { - "description": "fs:scope-public -> This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder.", + "description": "fs:scope-public -> This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder.", "type": "string", "enum": [ "fs:scope-public" @@ -2026,7 +2026,7 @@ ] }, { - "description": "fs:scope-resource -> This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder.", + "description": "fs:scope-resource -> This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder.", "type": "string", "enum": [ "fs:scope-resource" @@ -2047,7 +2047,7 @@ ] }, { - "description": "fs:scope-runtime -> This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder.", + "description": "fs:scope-runtime -> This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder.", "type": "string", "enum": [ "fs:scope-runtime" @@ -2068,7 +2068,7 @@ ] }, { - "description": "fs:scope-temp -> This scope permits access to all files and list content of top level directories in the `$TEMP`folder.", + "description": "fs:scope-temp -> This scope permits access to all files and list content of top level directories in the `$TEMP` folder.", "type": "string", "enum": [ "fs:scope-temp" @@ -2089,7 +2089,7 @@ ] }, { - "description": "fs:scope-template -> This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder.", + "description": "fs:scope-template -> This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder.", "type": "string", "enum": [ "fs:scope-template" @@ -2110,7 +2110,7 @@ ] }, { - "description": "fs:scope-video -> This scope permits access to all files and list content of top level directories in the `$VIDEO`folder.", + "description": "fs:scope-video -> This scope permits access to all files and list content of top level directories in the `$VIDEO` folder.", "type": "string", "enum": [ "fs:scope-video" @@ -2427,7 +2427,7 @@ ] }, "cmd": { - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", "type": "string" }, "name": { @@ -2462,7 +2462,7 @@ ] }, "cmd": { - "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", + "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.", "type": "string" }, "name": { @@ -4746,42 +4746,42 @@ ] }, { - "description": "fs:allow-app-meta -> This allows non-recursive read access to metadata of the `$APP` folder, including file listing and statistics.", + "description": "fs:allow-app-meta -> This allows non-recursive read access to metadata of the application folders, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-app-meta" ] }, { - "description": "fs:allow-app-meta-recursive -> This allows full recursive read access to metadata of the `$APP` folder, including file listing and statistics.", + "description": "fs:allow-app-meta-recursive -> This allows full recursive read access to metadata of the application folders, including file listing and statistics.", "type": "string", "enum": [ "fs:allow-app-meta-recursive" ] }, { - "description": "fs:allow-app-read -> This allows non-recursive read access to the `$APP` folder.", + "description": "fs:allow-app-read -> This allows non-recursive read access to the application folders.", "type": "string", "enum": [ "fs:allow-app-read" ] }, { - "description": "fs:allow-app-read-recursive -> This allows full recursive read access to the complete `$APP` folder, files and subdirectories.", + "description": "fs:allow-app-read-recursive -> This allows full recursive read access to the complete application folders, files and subdirectories.", "type": "string", "enum": [ "fs:allow-app-read-recursive" ] }, { - "description": "fs:allow-app-write -> This allows non-recursive write access to the `$APP` folder.", + "description": "fs:allow-app-write -> This allows non-recursive write access to the application folders.", "type": "string", "enum": [ "fs:allow-app-write" ] }, { - "description": "fs:allow-app-write-recursive -> This allows full recursive write access to the complete `$APP` folder, files and subdirectories.", + "description": "fs:allow-app-write-recursive -> This allows full recursive write access to the complete application folders, files and subdirectories.", "type": "string", "enum": [ "fs:allow-app-write-recursive" @@ -6209,28 +6209,28 @@ ] }, { - "description": "fs:scope-app -> This scope permits access to all files and list content of top level directories in the `$APP`folder.", + "description": "fs:scope-app -> This scope permits access to all files and list content of top level directories in the application folders.", "type": "string", "enum": [ "fs:scope-app" ] }, { - "description": "fs:scope-app-index -> This scope permits to list all files and folders in the `$APP`folder.", + "description": "fs:scope-app-index -> This scope permits to list all files and folders in the application directories.", "type": "string", "enum": [ "fs:scope-app-index" ] }, { - "description": "fs:scope-app-recursive -> This scope permits recursive access to the complete `$APP` folder, including sub directories and files.", + "description": "fs:scope-app-recursive -> This scope permits recursive access to the complete application folders, including sub directories and files.", "type": "string", "enum": [ "fs:scope-app-recursive" ] }, { - "description": "fs:scope-appcache -> This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder.", + "description": "fs:scope-appcache -> This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder.", "type": "string", "enum": [ "fs:scope-appcache" @@ -6251,7 +6251,7 @@ ] }, { - "description": "fs:scope-appconfig -> This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder.", + "description": "fs:scope-appconfig -> This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder.", "type": "string", "enum": [ "fs:scope-appconfig" @@ -6272,7 +6272,7 @@ ] }, { - "description": "fs:scope-appdata -> This scope permits access to all files and list content of top level directories in the `$APPDATA`folder.", + "description": "fs:scope-appdata -> This scope permits access to all files and list content of top level directories in the `$APPDATA` folder.", "type": "string", "enum": [ "fs:scope-appdata" @@ -6293,7 +6293,7 @@ ] }, { - "description": "fs:scope-applocaldata -> This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder.", + "description": "fs:scope-applocaldata -> This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder.", "type": "string", "enum": [ "fs:scope-applocaldata" @@ -6314,7 +6314,7 @@ ] }, { - "description": "fs:scope-applog -> This scope permits access to all files and list content of top level directories in the `$APPLOG`folder.", + "description": "fs:scope-applog -> This scope permits access to all files and list content of top level directories in the `$APPLOG` folder.", "type": "string", "enum": [ "fs:scope-applog" @@ -6335,7 +6335,7 @@ ] }, { - "description": "fs:scope-audio -> This scope permits access to all files and list content of top level directories in the `$AUDIO`folder.", + "description": "fs:scope-audio -> This scope permits access to all files and list content of top level directories in the `$AUDIO` folder.", "type": "string", "enum": [ "fs:scope-audio" @@ -6356,7 +6356,7 @@ ] }, { - "description": "fs:scope-cache -> This scope permits access to all files and list content of top level directories in the `$CACHE`folder.", + "description": "fs:scope-cache -> This scope permits access to all files and list content of top level directories in the `$CACHE` folder.", "type": "string", "enum": [ "fs:scope-cache" @@ -6377,7 +6377,7 @@ ] }, { - "description": "fs:scope-config -> This scope permits access to all files and list content of top level directories in the `$CONFIG`folder.", + "description": "fs:scope-config -> This scope permits access to all files and list content of top level directories in the `$CONFIG` folder.", "type": "string", "enum": [ "fs:scope-config" @@ -6398,7 +6398,7 @@ ] }, { - "description": "fs:scope-data -> This scope permits access to all files and list content of top level directories in the `$DATA`folder.", + "description": "fs:scope-data -> This scope permits access to all files and list content of top level directories in the `$DATA` folder.", "type": "string", "enum": [ "fs:scope-data" @@ -6419,7 +6419,7 @@ ] }, { - "description": "fs:scope-desktop -> This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder.", + "description": "fs:scope-desktop -> This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder.", "type": "string", "enum": [ "fs:scope-desktop" @@ -6440,7 +6440,7 @@ ] }, { - "description": "fs:scope-document -> This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder.", + "description": "fs:scope-document -> This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder.", "type": "string", "enum": [ "fs:scope-document" @@ -6461,7 +6461,7 @@ ] }, { - "description": "fs:scope-download -> This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder.", + "description": "fs:scope-download -> This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder.", "type": "string", "enum": [ "fs:scope-download" @@ -6482,7 +6482,7 @@ ] }, { - "description": "fs:scope-exe -> This scope permits access to all files and list content of top level directories in the `$EXE`folder.", + "description": "fs:scope-exe -> This scope permits access to all files and list content of top level directories in the `$EXE` folder.", "type": "string", "enum": [ "fs:scope-exe" @@ -6503,7 +6503,7 @@ ] }, { - "description": "fs:scope-font -> This scope permits access to all files and list content of top level directories in the `$FONT`folder.", + "description": "fs:scope-font -> This scope permits access to all files and list content of top level directories in the `$FONT` folder.", "type": "string", "enum": [ "fs:scope-font" @@ -6524,7 +6524,7 @@ ] }, { - "description": "fs:scope-home -> This scope permits access to all files and list content of top level directories in the `$HOME`folder.", + "description": "fs:scope-home -> This scope permits access to all files and list content of top level directories in the `$HOME` folder.", "type": "string", "enum": [ "fs:scope-home" @@ -6545,7 +6545,7 @@ ] }, { - "description": "fs:scope-localdata -> This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder.", + "description": "fs:scope-localdata -> This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder.", "type": "string", "enum": [ "fs:scope-localdata" @@ -6566,7 +6566,7 @@ ] }, { - "description": "fs:scope-log -> This scope permits access to all files and list content of top level directories in the `$LOG`folder.", + "description": "fs:scope-log -> This scope permits access to all files and list content of top level directories in the `$LOG` folder.", "type": "string", "enum": [ "fs:scope-log" @@ -6587,7 +6587,7 @@ ] }, { - "description": "fs:scope-picture -> This scope permits access to all files and list content of top level directories in the `$PICTURE`folder.", + "description": "fs:scope-picture -> This scope permits access to all files and list content of top level directories in the `$PICTURE` folder.", "type": "string", "enum": [ "fs:scope-picture" @@ -6608,7 +6608,7 @@ ] }, { - "description": "fs:scope-public -> This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder.", + "description": "fs:scope-public -> This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder.", "type": "string", "enum": [ "fs:scope-public" @@ -6629,7 +6629,7 @@ ] }, { - "description": "fs:scope-resource -> This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder.", + "description": "fs:scope-resource -> This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder.", "type": "string", "enum": [ "fs:scope-resource" @@ -6650,7 +6650,7 @@ ] }, { - "description": "fs:scope-runtime -> This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder.", + "description": "fs:scope-runtime -> This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder.", "type": "string", "enum": [ "fs:scope-runtime" @@ -6671,7 +6671,7 @@ ] }, { - "description": "fs:scope-temp -> This scope permits access to all files and list content of top level directories in the `$TEMP`folder.", + "description": "fs:scope-temp -> This scope permits access to all files and list content of top level directories in the `$TEMP` folder.", "type": "string", "enum": [ "fs:scope-temp" @@ -6692,7 +6692,7 @@ ] }, { - "description": "fs:scope-template -> This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder.", + "description": "fs:scope-template -> This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder.", "type": "string", "enum": [ "fs:scope-template" @@ -6713,7 +6713,7 @@ ] }, { - "description": "fs:scope-video -> This scope permits access to all files and list content of top level directories in the `$VIDEO`folder.", + "description": "fs:scope-video -> This scope permits access to all files and list content of top level directories in the `$VIDEO` folder.", "type": "string", "enum": [ "fs:scope-video" diff --git a/plugins/fs/build.rs b/plugins/fs/build.rs index af35f0e8..5a641eb6 100644 --- a/plugins/fs/build.rs +++ b/plugins/fs/build.rs @@ -52,7 +52,6 @@ const BASE_DIR_VARS: &[&str] = &[ "TEMPLATE", "VIDEO", "RESOURCE", - "APP", "LOG", "TEMP", "APPCONFIG", @@ -118,7 +117,7 @@ path = "${upper}/**" [[permission]] identifier = "scope-{lower}" -description = "This scope permits access to all files and list content of top level directories in the `${upper}`folder." +description = "This scope permits access to all files and list content of top level directories in the `${upper}` folder." [[permission.scope.allow]] path = "${upper}" diff --git a/plugins/fs/guest-js/index.ts b/plugins/fs/guest-js/index.ts index da5aad90..1f314f71 100644 --- a/plugins/fs/guest-js/index.ts +++ b/plugins/fs/guest-js/index.ts @@ -270,7 +270,7 @@ class FileHandle extends Resource { * @example * ```typescript * import { open, BaseDirectory } from "@tauri-apps/plugin-fs" - * // if "$APP/foo/bar.txt" contains the text "hello world": + * // if "$APPCONFIG/foo/bar.txt" contains the text "hello world": * const file = await open("foo/bar.txt", { baseDir: BaseDirectory.AppConfig }); * const buf = new Uint8Array(100); * const numberOfBytesRead = await file.read(buf); // 11 bytes diff --git a/plugins/fs/permissions/app.toml b/plugins/fs/permissions/app.toml new file mode 100644 index 00000000..aeb0521b --- /dev/null +++ b/plugins/fs/permissions/app.toml @@ -0,0 +1,114 @@ +"$schema" = "schemas/schema.json" + +# Scopes Section +# This section contains scopes, which define file level access + +[[permission]] +identifier = "scope-app-recursive" +description = "This scope permits recursive access to the complete application folders, including sub directories and files." + +[[permission.scope.allow]] +path = "$APPCONFIG" +[[permission.scope.allow]] +path = "$APPCONFIG/**" + +[[permission.scope.allow]] +path = "$APPDATA" +[[permission.scope.allow]] +path = "$APPDATA/**" + +[[permission.scope.allow]] +path = "$APPLOCALDATA" +[[permission.scope.allow]] +path = "$APPLOCALDATA/**" + +[[permission.scope.allow]] +path = "$APPCACHE" +[[permission.scope.allow]] +path = "$APPCACHE/**" + +[[permission.scope.allow]] +path = "$APPLOG" +[[permission.scope.allow]] +path = "$APPLOG/**" + +[[permission]] +identifier = "scope-app" +description = "This scope permits access to all files and list content of top level directories in the application folders." + +[[permission.scope.allow]] +path = "$APPCONFIG" +[[permission.scope.allow]] +path = "$APPCONFIG/*" + +[[permission.scope.allow]] +path = "$APPDATA" +[[permission.scope.allow]] +path = "$APPDATA/*" + +[[permission.scope.allow]] +path = "$APPLOCALDATA" +[[permission.scope.allow]] +path = "$APPLOCALDATA/*" + +[[permission.scope.allow]] +path = "$APPCACHE" +[[permission.scope.allow]] +path = "$APPCACHE/*" + +[[permission.scope.allow]] +path = "$APPLOG" +[[permission.scope.allow]] +path = "$APPLOG/*" + +[[permission]] +identifier = "scope-app-index" +description = "This scope permits to list all files and folders in the application directories." + +[[permission.scope.allow]] +path = "$APPCONFIG" + +[[permission.scope.allow]] +path = "$APPDATA" + +[[permission.scope.allow]] +path = "$APPLOCALDATA" + +[[permission.scope.allow]] +path = "$APPCACHE" + +[[permission.scope.allow]] +path = "$APPLOG" + +# Sets Section +# This section combines the scope elements with enablement of commands + +[[set]] +identifier = "allow-app-read-recursive" +description = "This allows full recursive read access to the complete application folders, files and subdirectories." +permissions = ["read-all", "scope-app-recursive"] + +[[set]] +identifier = "allow-app-write-recursive" +description = "This allows full recursive write access to the complete application folders, files and subdirectories." +permissions = ["write-all", "scope-app-recursive"] + +[[set]] +identifier = "allow-app-read" +description = "This allows non-recursive read access to the application folders." +permissions = ["read-all", "scope-app"] + +[[set]] +identifier = "allow-app-write" +description = "This allows non-recursive write access to the application folders." +permissions = ["write-all", "scope-app"] + +[[set]] +identifier = "allow-app-meta-recursive" +description = "This allows full recursive read access to metadata of the application folders, including file listing and statistics." +permissions = ["read-meta", "scope-app-recursive"] + +[[set]] +identifier = "allow-app-meta" +description = "This allows non-recursive read access to metadata of the application folders, including file listing and statistics." +permissions = ["read-meta", "scope-app-index"] diff --git a/plugins/fs/permissions/autogenerated/base-directories/app.toml b/plugins/fs/permissions/autogenerated/base-directories/app.toml deleted file mode 100644 index 32401f4c..00000000 --- a/plugins/fs/permissions/autogenerated/base-directories/app.toml +++ /dev/null @@ -1,82 +0,0 @@ -# Automatically generated - DO NOT EDIT! - -"$schema" = "../../schemas/schema.json" - -# Scopes Section -# This section contains scopes, which define file level access - -[[permission]] -identifier = "scope-app-recursive" -description = "This scope permits recursive access to the complete `$APP` folder, including sub directories and files." - -[[permission.scope.allow]] -path = "$APP" -[[permission.scope.allow]] -path = "$APP/**" - -[[permission]] -identifier = "scope-app" -description = "This scope permits access to all files and list content of top level directories in the `$APP`folder." - -[[permission.scope.allow]] -path = "$APP" -[[permission.scope.allow]] -path = "$APP/*" - -[[permission]] -identifier = "scope-app-index" -description = "This scope permits to list all files and folders in the `$APP`folder." - -[[permission.scope.allow]] -path = "$APP" - -# Sets Section -# This section combines the scope elements with enablement of commands - -[[set]] -identifier = "allow-app-read-recursive" -description = "This allows full recursive read access to the complete `$APP` folder, files and subdirectories." -permissions = [ - "read-all", - "scope-app-recursive" -] - -[[set]] -identifier = "allow-app-write-recursive" -description = "This allows full recursive write access to the complete `$APP` folder, files and subdirectories." -permissions = [ - "write-all", - "scope-app-recursive" -] - -[[set]] -identifier = "allow-app-read" -description = "This allows non-recursive read access to the `$APP` folder." -permissions = [ - "read-all", - "scope-app" -] - -[[set]] -identifier = "allow-app-write" -description = "This allows non-recursive write access to the `$APP` folder." -permissions = [ - "write-all", - "scope-app" -] - -[[set]] -identifier = "allow-app-meta-recursive" -description = "This allows full recursive read access to metadata of the `$APP` folder, including file listing and statistics." -permissions = [ - "read-meta", - "scope-app-recursive" -] - -[[set]] -identifier = "allow-app-meta" -description = "This allows non-recursive read access to metadata of the `$APP` folder, including file listing and statistics." -permissions = [ - "read-meta", - "scope-app-index" -] \ No newline at end of file diff --git a/plugins/fs/permissions/autogenerated/base-directories/appcache.toml b/plugins/fs/permissions/autogenerated/base-directories/appcache.toml index 50e168c3..50e19efc 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/appcache.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/appcache.toml @@ -16,7 +16,7 @@ path = "$APPCACHE/**" [[permission]] identifier = "scope-appcache" -description = "This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder." +description = "This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder." [[permission.scope.allow]] path = "$APPCACHE" diff --git a/plugins/fs/permissions/autogenerated/base-directories/appconfig.toml b/plugins/fs/permissions/autogenerated/base-directories/appconfig.toml index 4b106290..ab136956 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/appconfig.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/appconfig.toml @@ -16,7 +16,7 @@ path = "$APPCONFIG/**" [[permission]] identifier = "scope-appconfig" -description = "This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder." +description = "This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder." [[permission.scope.allow]] path = "$APPCONFIG" diff --git a/plugins/fs/permissions/autogenerated/base-directories/appdata.toml b/plugins/fs/permissions/autogenerated/base-directories/appdata.toml index 36d99619..1b0931e2 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/appdata.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/appdata.toml @@ -16,7 +16,7 @@ path = "$APPDATA/**" [[permission]] identifier = "scope-appdata" -description = "This scope permits access to all files and list content of top level directories in the `$APPDATA`folder." +description = "This scope permits access to all files and list content of top level directories in the `$APPDATA` folder." [[permission.scope.allow]] path = "$APPDATA" diff --git a/plugins/fs/permissions/autogenerated/base-directories/applocaldata.toml b/plugins/fs/permissions/autogenerated/base-directories/applocaldata.toml index d538fdd2..a6e38a31 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/applocaldata.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/applocaldata.toml @@ -16,7 +16,7 @@ path = "$APPLOCALDATA/**" [[permission]] identifier = "scope-applocaldata" -description = "This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder." +description = "This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder." [[permission.scope.allow]] path = "$APPLOCALDATA" diff --git a/plugins/fs/permissions/autogenerated/base-directories/applog.toml b/plugins/fs/permissions/autogenerated/base-directories/applog.toml index c53a0178..a979ce76 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/applog.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/applog.toml @@ -16,7 +16,7 @@ path = "$APPLOG/**" [[permission]] identifier = "scope-applog" -description = "This scope permits access to all files and list content of top level directories in the `$APPLOG`folder." +description = "This scope permits access to all files and list content of top level directories in the `$APPLOG` folder." [[permission.scope.allow]] path = "$APPLOG" diff --git a/plugins/fs/permissions/autogenerated/base-directories/audio.toml b/plugins/fs/permissions/autogenerated/base-directories/audio.toml index 51d394c6..d66d68a2 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/audio.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/audio.toml @@ -16,7 +16,7 @@ path = "$AUDIO/**" [[permission]] identifier = "scope-audio" -description = "This scope permits access to all files and list content of top level directories in the `$AUDIO`folder." +description = "This scope permits access to all files and list content of top level directories in the `$AUDIO` folder." [[permission.scope.allow]] path = "$AUDIO" diff --git a/plugins/fs/permissions/autogenerated/base-directories/cache.toml b/plugins/fs/permissions/autogenerated/base-directories/cache.toml index 68b1fe59..814319eb 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/cache.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/cache.toml @@ -16,7 +16,7 @@ path = "$CACHE/**" [[permission]] identifier = "scope-cache" -description = "This scope permits access to all files and list content of top level directories in the `$CACHE`folder." +description = "This scope permits access to all files and list content of top level directories in the `$CACHE` folder." [[permission.scope.allow]] path = "$CACHE" diff --git a/plugins/fs/permissions/autogenerated/base-directories/config.toml b/plugins/fs/permissions/autogenerated/base-directories/config.toml index 9a645065..59221045 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/config.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/config.toml @@ -16,7 +16,7 @@ path = "$CONFIG/**" [[permission]] identifier = "scope-config" -description = "This scope permits access to all files and list content of top level directories in the `$CONFIG`folder." +description = "This scope permits access to all files and list content of top level directories in the `$CONFIG` folder." [[permission.scope.allow]] path = "$CONFIG" diff --git a/plugins/fs/permissions/autogenerated/base-directories/data.toml b/plugins/fs/permissions/autogenerated/base-directories/data.toml index f395fa14..a8428ca1 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/data.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/data.toml @@ -16,7 +16,7 @@ path = "$DATA/**" [[permission]] identifier = "scope-data" -description = "This scope permits access to all files and list content of top level directories in the `$DATA`folder." +description = "This scope permits access to all files and list content of top level directories in the `$DATA` folder." [[permission.scope.allow]] path = "$DATA" diff --git a/plugins/fs/permissions/autogenerated/base-directories/desktop.toml b/plugins/fs/permissions/autogenerated/base-directories/desktop.toml index 8d51c41b..da369fa0 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/desktop.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/desktop.toml @@ -16,7 +16,7 @@ path = "$DESKTOP/**" [[permission]] identifier = "scope-desktop" -description = "This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder." +description = "This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder." [[permission.scope.allow]] path = "$DESKTOP" diff --git a/plugins/fs/permissions/autogenerated/base-directories/document.toml b/plugins/fs/permissions/autogenerated/base-directories/document.toml index 17ce3556..9feb4d0d 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/document.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/document.toml @@ -16,7 +16,7 @@ path = "$DOCUMENT/**" [[permission]] identifier = "scope-document" -description = "This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder." +description = "This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder." [[permission.scope.allow]] path = "$DOCUMENT" diff --git a/plugins/fs/permissions/autogenerated/base-directories/download.toml b/plugins/fs/permissions/autogenerated/base-directories/download.toml index 087ce2d4..8659e3ac 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/download.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/download.toml @@ -16,7 +16,7 @@ path = "$DOWNLOAD/**" [[permission]] identifier = "scope-download" -description = "This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder." +description = "This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder." [[permission.scope.allow]] path = "$DOWNLOAD" diff --git a/plugins/fs/permissions/autogenerated/base-directories/exe.toml b/plugins/fs/permissions/autogenerated/base-directories/exe.toml index b0d33f02..94950e84 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/exe.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/exe.toml @@ -16,7 +16,7 @@ path = "$EXE/**" [[permission]] identifier = "scope-exe" -description = "This scope permits access to all files and list content of top level directories in the `$EXE`folder." +description = "This scope permits access to all files and list content of top level directories in the `$EXE` folder." [[permission.scope.allow]] path = "$EXE" diff --git a/plugins/fs/permissions/autogenerated/base-directories/font.toml b/plugins/fs/permissions/autogenerated/base-directories/font.toml index 6b1ec813..21840046 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/font.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/font.toml @@ -16,7 +16,7 @@ path = "$FONT/**" [[permission]] identifier = "scope-font" -description = "This scope permits access to all files and list content of top level directories in the `$FONT`folder." +description = "This scope permits access to all files and list content of top level directories in the `$FONT` folder." [[permission.scope.allow]] path = "$FONT" diff --git a/plugins/fs/permissions/autogenerated/base-directories/home.toml b/plugins/fs/permissions/autogenerated/base-directories/home.toml index fd954f56..cbf48e2f 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/home.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/home.toml @@ -16,7 +16,7 @@ path = "$HOME/**" [[permission]] identifier = "scope-home" -description = "This scope permits access to all files and list content of top level directories in the `$HOME`folder." +description = "This scope permits access to all files and list content of top level directories in the `$HOME` folder." [[permission.scope.allow]] path = "$HOME" diff --git a/plugins/fs/permissions/autogenerated/base-directories/localdata.toml b/plugins/fs/permissions/autogenerated/base-directories/localdata.toml index a86dd16e..90a8f48b 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/localdata.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/localdata.toml @@ -16,7 +16,7 @@ path = "$LOCALDATA/**" [[permission]] identifier = "scope-localdata" -description = "This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder." +description = "This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder." [[permission.scope.allow]] path = "$LOCALDATA" diff --git a/plugins/fs/permissions/autogenerated/base-directories/log.toml b/plugins/fs/permissions/autogenerated/base-directories/log.toml index d9a51cce..d505a3ce 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/log.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/log.toml @@ -16,7 +16,7 @@ path = "$LOG/**" [[permission]] identifier = "scope-log" -description = "This scope permits access to all files and list content of top level directories in the `$LOG`folder." +description = "This scope permits access to all files and list content of top level directories in the `$LOG` folder." [[permission.scope.allow]] path = "$LOG" diff --git a/plugins/fs/permissions/autogenerated/base-directories/picture.toml b/plugins/fs/permissions/autogenerated/base-directories/picture.toml index ac061e23..6a760909 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/picture.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/picture.toml @@ -16,7 +16,7 @@ path = "$PICTURE/**" [[permission]] identifier = "scope-picture" -description = "This scope permits access to all files and list content of top level directories in the `$PICTURE`folder." +description = "This scope permits access to all files and list content of top level directories in the `$PICTURE` folder." [[permission.scope.allow]] path = "$PICTURE" diff --git a/plugins/fs/permissions/autogenerated/base-directories/public.toml b/plugins/fs/permissions/autogenerated/base-directories/public.toml index 9584bd92..2e39abb4 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/public.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/public.toml @@ -16,7 +16,7 @@ path = "$PUBLIC/**" [[permission]] identifier = "scope-public" -description = "This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder." +description = "This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder." [[permission.scope.allow]] path = "$PUBLIC" diff --git a/plugins/fs/permissions/autogenerated/base-directories/resource.toml b/plugins/fs/permissions/autogenerated/base-directories/resource.toml index 54a739d7..53dfeb07 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/resource.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/resource.toml @@ -16,7 +16,7 @@ path = "$RESOURCE/**" [[permission]] identifier = "scope-resource" -description = "This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder." +description = "This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder." [[permission.scope.allow]] path = "$RESOURCE" diff --git a/plugins/fs/permissions/autogenerated/base-directories/runtime.toml b/plugins/fs/permissions/autogenerated/base-directories/runtime.toml index 3f9bb2c0..8dcc2a03 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/runtime.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/runtime.toml @@ -16,7 +16,7 @@ path = "$RUNTIME/**" [[permission]] identifier = "scope-runtime" -description = "This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder." +description = "This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder." [[permission.scope.allow]] path = "$RUNTIME" diff --git a/plugins/fs/permissions/autogenerated/base-directories/temp.toml b/plugins/fs/permissions/autogenerated/base-directories/temp.toml index 383f5409..c08e1da2 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/temp.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/temp.toml @@ -16,7 +16,7 @@ path = "$TEMP/**" [[permission]] identifier = "scope-temp" -description = "This scope permits access to all files and list content of top level directories in the `$TEMP`folder." +description = "This scope permits access to all files and list content of top level directories in the `$TEMP` folder." [[permission.scope.allow]] path = "$TEMP" diff --git a/plugins/fs/permissions/autogenerated/base-directories/template.toml b/plugins/fs/permissions/autogenerated/base-directories/template.toml index b523b9ee..ce39f773 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/template.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/template.toml @@ -16,7 +16,7 @@ path = "$TEMPLATE/**" [[permission]] identifier = "scope-template" -description = "This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder." +description = "This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder." [[permission.scope.allow]] path = "$TEMPLATE" diff --git a/plugins/fs/permissions/autogenerated/base-directories/video.toml b/plugins/fs/permissions/autogenerated/base-directories/video.toml index 8d32b7bd..df41abdc 100644 --- a/plugins/fs/permissions/autogenerated/base-directories/video.toml +++ b/plugins/fs/permissions/autogenerated/base-directories/video.toml @@ -16,7 +16,7 @@ path = "$VIDEO/**" [[permission]] identifier = "scope-video" -description = "This scope permits access to all files and list content of top level directories in the `$VIDEO`folder." +description = "This scope permits access to all files and list content of top level directories in the `$VIDEO` folder." [[permission.scope.allow]] path = "$VIDEO" diff --git a/plugins/fs/permissions/autogenerated/reference.md b/plugins/fs/permissions/autogenerated/reference.md index 6913f47a..cc6477f1 100644 --- a/plugins/fs/permissions/autogenerated/reference.md +++ b/plugins/fs/permissions/autogenerated/reference.md @@ -47,7 +47,7 @@ On Windows the webview data folder access is denied. -This allows full recursive read access to the complete `$APP` folder, files and subdirectories. +This allows full recursive read access to the complete application folders, files and subdirectories. @@ -60,7 +60,7 @@ This allows full recursive read access to the complete `$APP` folder, files and -This allows full recursive write access to the complete `$APP` folder, files and subdirectories. +This allows full recursive write access to the complete application folders, files and subdirectories. @@ -73,7 +73,7 @@ This allows full recursive write access to the complete `$APP` folder, files and -This allows non-recursive read access to the `$APP` folder. +This allows non-recursive read access to the application folders. @@ -86,7 +86,7 @@ This allows non-recursive read access to the `$APP` folder. -This allows non-recursive write access to the `$APP` folder. +This allows non-recursive write access to the application folders. @@ -99,7 +99,7 @@ This allows non-recursive write access to the `$APP` folder. -This allows full recursive read access to metadata of the `$APP` folder, including file listing and statistics. +This allows full recursive read access to metadata of the application folders, including file listing and statistics. @@ -112,7 +112,7 @@ This allows full recursive read access to metadata of the `$APP` folder, includi -This allows non-recursive read access to metadata of the `$APP` folder, including file listing and statistics. +This allows non-recursive read access to metadata of the application folders, including file listing and statistics. @@ -125,7 +125,7 @@ This allows non-recursive read access to metadata of the `$APP` folder, includin -This scope permits recursive access to the complete `$APP` folder, including sub directories and files. +This scope permits recursive access to the complete application folders, including sub directories and files. @@ -138,7 +138,7 @@ This scope permits recursive access to the complete `$APP` folder, including sub -This scope permits access to all files and list content of top level directories in the `$APP`folder. +This scope permits access to all files and list content of top level directories in the application folders. @@ -151,7 +151,7 @@ This scope permits access to all files and list content of top level directories -This scope permits to list all files and folders in the `$APP`folder. +This scope permits to list all files and folders in the application directories. @@ -255,7 +255,7 @@ This scope permits recursive access to the complete `$APPCACHE` folder, includin -This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder. +This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder. @@ -372,7 +372,7 @@ This scope permits recursive access to the complete `$APPCONFIG` folder, includi -This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder. +This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder. @@ -489,7 +489,7 @@ This scope permits recursive access to the complete `$APPDATA` folder, including -This scope permits access to all files and list content of top level directories in the `$APPDATA`folder. +This scope permits access to all files and list content of top level directories in the `$APPDATA` folder. @@ -606,7 +606,7 @@ This scope permits recursive access to the complete `$APPLOCALDATA` folder, incl -This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder. +This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder. @@ -723,7 +723,7 @@ This scope permits recursive access to the complete `$APPLOG` folder, including -This scope permits access to all files and list content of top level directories in the `$APPLOG`folder. +This scope permits access to all files and list content of top level directories in the `$APPLOG` folder. @@ -840,7 +840,7 @@ This scope permits recursive access to the complete `$AUDIO` folder, including s -This scope permits access to all files and list content of top level directories in the `$AUDIO`folder. +This scope permits access to all files and list content of top level directories in the `$AUDIO` folder. @@ -957,7 +957,7 @@ This scope permits recursive access to the complete `$CACHE` folder, including s -This scope permits access to all files and list content of top level directories in the `$CACHE`folder. +This scope permits access to all files and list content of top level directories in the `$CACHE` folder. @@ -1074,7 +1074,7 @@ This scope permits recursive access to the complete `$CONFIG` folder, including -This scope permits access to all files and list content of top level directories in the `$CONFIG`folder. +This scope permits access to all files and list content of top level directories in the `$CONFIG` folder. @@ -1191,7 +1191,7 @@ This scope permits recursive access to the complete `$DATA` folder, including su -This scope permits access to all files and list content of top level directories in the `$DATA`folder. +This scope permits access to all files and list content of top level directories in the `$DATA` folder. @@ -1308,7 +1308,7 @@ This scope permits recursive access to the complete `$DESKTOP` folder, including -This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder. +This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder. @@ -1425,7 +1425,7 @@ This scope permits recursive access to the complete `$DOCUMENT` folder, includin -This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder. +This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder. @@ -1542,7 +1542,7 @@ This scope permits recursive access to the complete `$DOWNLOAD` folder, includin -This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder. +This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder. @@ -1659,7 +1659,7 @@ This scope permits recursive access to the complete `$EXE` folder, including sub -This scope permits access to all files and list content of top level directories in the `$EXE`folder. +This scope permits access to all files and list content of top level directories in the `$EXE` folder. @@ -1776,7 +1776,7 @@ This scope permits recursive access to the complete `$FONT` folder, including su -This scope permits access to all files and list content of top level directories in the `$FONT`folder. +This scope permits access to all files and list content of top level directories in the `$FONT` folder. @@ -1893,7 +1893,7 @@ This scope permits recursive access to the complete `$HOME` folder, including su -This scope permits access to all files and list content of top level directories in the `$HOME`folder. +This scope permits access to all files and list content of top level directories in the `$HOME` folder. @@ -2010,7 +2010,7 @@ This scope permits recursive access to the complete `$LOCALDATA` folder, includi -This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder. +This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder. @@ -2127,7 +2127,7 @@ This scope permits recursive access to the complete `$LOG` folder, including sub -This scope permits access to all files and list content of top level directories in the `$LOG`folder. +This scope permits access to all files and list content of top level directories in the `$LOG` folder. @@ -2244,7 +2244,7 @@ This scope permits recursive access to the complete `$PICTURE` folder, including -This scope permits access to all files and list content of top level directories in the `$PICTURE`folder. +This scope permits access to all files and list content of top level directories in the `$PICTURE` folder. @@ -2361,7 +2361,7 @@ This scope permits recursive access to the complete `$PUBLIC` folder, including -This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder. +This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder. @@ -2478,7 +2478,7 @@ This scope permits recursive access to the complete `$RESOURCE` folder, includin -This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder. +This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder. @@ -2595,7 +2595,7 @@ This scope permits recursive access to the complete `$RUNTIME` folder, including -This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder. +This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder. @@ -2712,7 +2712,7 @@ This scope permits recursive access to the complete `$TEMP` folder, including su -This scope permits access to all files and list content of top level directories in the `$TEMP`folder. +This scope permits access to all files and list content of top level directories in the `$TEMP` folder. @@ -2829,7 +2829,7 @@ This scope permits recursive access to the complete `$TEMPLATE` folder, includin -This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder. +This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder. @@ -2946,7 +2946,7 @@ This scope permits recursive access to the complete `$VIDEO` folder, including s -This scope permits access to all files and list content of top level directories in the `$VIDEO`folder. +This scope permits access to all files and list content of top level directories in the `$VIDEO` folder. diff --git a/plugins/fs/permissions/create-app-specific-dirs.toml b/plugins/fs/permissions/create-app-specific-dirs.toml index 68a84921..7785cb13 100644 --- a/plugins/fs/permissions/create-app-specific-dirs.toml +++ b/plugins/fs/permissions/create-app-specific-dirs.toml @@ -5,19 +5,4 @@ identifier = "create-app-specific-dirs" description = """ This permissions allows to create the application specific directories. """ -commands.allow = ["mkdir"] - -[[permission.scope.allow]] -path = "$APPCONFIG" - -[[permission.scope.allow]] -path = "$APPDATA" - -[[permission.scope.allow]] -path = "$APPLOCALDATA" - -[[permission.scope.allow]] -path = "$APPCACHE" - -[[permission.scope.allow]] -path = "$APPLOG" +commands.allow = ["mkdir", "scope-app-index"] diff --git a/plugins/fs/permissions/read-app-specific-dirs-recursive.toml b/plugins/fs/permissions/read-app-specific-dirs-recursive.toml index af1d0fce..5342dbc0 100644 --- a/plugins/fs/permissions/read-app-specific-dirs-recursive.toml +++ b/plugins/fs/permissions/read-app-specific-dirs-recursive.toml @@ -13,19 +13,5 @@ commands.allow = [ "read_text_file_lines", "read_text_file_lines_next", "exists", + "scope-app-recursive", ] - -[[permission.scope.allow]] -path = "$APPCONFIG/**" - -[[permission.scope.allow]] -path = "$APPDATA/**" - -[[permission.scope.allow]] -path = "$APPLOCALDATA/**" - -[[permission.scope.allow]] -path = "$APPCACHE/**" - -[[permission.scope.allow]] -path = "$APPLOG/**" diff --git a/plugins/fs/permissions/schemas/schema.json b/plugins/fs/permissions/schemas/schema.json index 12fd7b34..8d3e77fc 100644 --- a/plugins/fs/permissions/schemas/schema.json +++ b/plugins/fs/permissions/schemas/schema.json @@ -295,63 +295,63 @@ "type": "string", "oneOf": [ { - "description": "allow-app-read-recursive -> This allows full recursive read access to the complete `$APP` folder, files and subdirectories.", + "description": "allow-app-read-recursive -> This allows full recursive read access to the complete application folders, files and subdirectories.", "type": "string", "enum": [ "allow-app-read-recursive" ] }, { - "description": "allow-app-write-recursive -> This allows full recursive write access to the complete `$APP` folder, files and subdirectories.", + "description": "allow-app-write-recursive -> This allows full recursive write access to the complete application folders, files and subdirectories.", "type": "string", "enum": [ "allow-app-write-recursive" ] }, { - "description": "allow-app-read -> This allows non-recursive read access to the `$APP` folder.", + "description": "allow-app-read -> This allows non-recursive read access to the application folders.", "type": "string", "enum": [ "allow-app-read" ] }, { - "description": "allow-app-write -> This allows non-recursive write access to the `$APP` folder.", + "description": "allow-app-write -> This allows non-recursive write access to the application folders.", "type": "string", "enum": [ "allow-app-write" ] }, { - "description": "allow-app-meta-recursive -> This allows full recursive read access to metadata of the `$APP` folder, including file listing and statistics.", + "description": "allow-app-meta-recursive -> This allows full recursive read access to metadata of the application folders, including file listing and statistics.", "type": "string", "enum": [ "allow-app-meta-recursive" ] }, { - "description": "allow-app-meta -> This allows non-recursive read access to metadata of the `$APP` folder, including file listing and statistics.", + "description": "allow-app-meta -> This allows non-recursive read access to metadata of the application folders, including file listing and statistics.", "type": "string", "enum": [ "allow-app-meta" ] }, { - "description": "scope-app-recursive -> This scope permits recursive access to the complete `$APP` folder, including sub directories and files.", + "description": "scope-app-recursive -> This scope permits recursive access to the complete application folders, including sub directories and files.", "type": "string", "enum": [ "scope-app-recursive" ] }, { - "description": "scope-app -> This scope permits access to all files and list content of top level directories in the `$APP`folder.", + "description": "scope-app -> This scope permits access to all files and list content of top level directories in the application folders.", "type": "string", "enum": [ "scope-app" ] }, { - "description": "scope-app-index -> This scope permits to list all files and folders in the `$APP`folder.", + "description": "scope-app-index -> This scope permits to list all files and folders in the application directories.", "type": "string", "enum": [ "scope-app-index" @@ -407,7 +407,7 @@ ] }, { - "description": "scope-appcache -> This scope permits access to all files and list content of top level directories in the `$APPCACHE`folder.", + "description": "scope-appcache -> This scope permits access to all files and list content of top level directories in the `$APPCACHE` folder.", "type": "string", "enum": [ "scope-appcache" @@ -470,7 +470,7 @@ ] }, { - "description": "scope-appconfig -> This scope permits access to all files and list content of top level directories in the `$APPCONFIG`folder.", + "description": "scope-appconfig -> This scope permits access to all files and list content of top level directories in the `$APPCONFIG` folder.", "type": "string", "enum": [ "scope-appconfig" @@ -533,7 +533,7 @@ ] }, { - "description": "scope-appdata -> This scope permits access to all files and list content of top level directories in the `$APPDATA`folder.", + "description": "scope-appdata -> This scope permits access to all files and list content of top level directories in the `$APPDATA` folder.", "type": "string", "enum": [ "scope-appdata" @@ -596,7 +596,7 @@ ] }, { - "description": "scope-applocaldata -> This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA`folder.", + "description": "scope-applocaldata -> This scope permits access to all files and list content of top level directories in the `$APPLOCALDATA` folder.", "type": "string", "enum": [ "scope-applocaldata" @@ -659,7 +659,7 @@ ] }, { - "description": "scope-applog -> This scope permits access to all files and list content of top level directories in the `$APPLOG`folder.", + "description": "scope-applog -> This scope permits access to all files and list content of top level directories in the `$APPLOG` folder.", "type": "string", "enum": [ "scope-applog" @@ -722,7 +722,7 @@ ] }, { - "description": "scope-audio -> This scope permits access to all files and list content of top level directories in the `$AUDIO`folder.", + "description": "scope-audio -> This scope permits access to all files and list content of top level directories in the `$AUDIO` folder.", "type": "string", "enum": [ "scope-audio" @@ -785,7 +785,7 @@ ] }, { - "description": "scope-cache -> This scope permits access to all files and list content of top level directories in the `$CACHE`folder.", + "description": "scope-cache -> This scope permits access to all files and list content of top level directories in the `$CACHE` folder.", "type": "string", "enum": [ "scope-cache" @@ -848,7 +848,7 @@ ] }, { - "description": "scope-config -> This scope permits access to all files and list content of top level directories in the `$CONFIG`folder.", + "description": "scope-config -> This scope permits access to all files and list content of top level directories in the `$CONFIG` folder.", "type": "string", "enum": [ "scope-config" @@ -911,7 +911,7 @@ ] }, { - "description": "scope-data -> This scope permits access to all files and list content of top level directories in the `$DATA`folder.", + "description": "scope-data -> This scope permits access to all files and list content of top level directories in the `$DATA` folder.", "type": "string", "enum": [ "scope-data" @@ -974,7 +974,7 @@ ] }, { - "description": "scope-desktop -> This scope permits access to all files and list content of top level directories in the `$DESKTOP`folder.", + "description": "scope-desktop -> This scope permits access to all files and list content of top level directories in the `$DESKTOP` folder.", "type": "string", "enum": [ "scope-desktop" @@ -1037,7 +1037,7 @@ ] }, { - "description": "scope-document -> This scope permits access to all files and list content of top level directories in the `$DOCUMENT`folder.", + "description": "scope-document -> This scope permits access to all files and list content of top level directories in the `$DOCUMENT` folder.", "type": "string", "enum": [ "scope-document" @@ -1100,7 +1100,7 @@ ] }, { - "description": "scope-download -> This scope permits access to all files and list content of top level directories in the `$DOWNLOAD`folder.", + "description": "scope-download -> This scope permits access to all files and list content of top level directories in the `$DOWNLOAD` folder.", "type": "string", "enum": [ "scope-download" @@ -1163,7 +1163,7 @@ ] }, { - "description": "scope-exe -> This scope permits access to all files and list content of top level directories in the `$EXE`folder.", + "description": "scope-exe -> This scope permits access to all files and list content of top level directories in the `$EXE` folder.", "type": "string", "enum": [ "scope-exe" @@ -1226,7 +1226,7 @@ ] }, { - "description": "scope-font -> This scope permits access to all files and list content of top level directories in the `$FONT`folder.", + "description": "scope-font -> This scope permits access to all files and list content of top level directories in the `$FONT` folder.", "type": "string", "enum": [ "scope-font" @@ -1289,7 +1289,7 @@ ] }, { - "description": "scope-home -> This scope permits access to all files and list content of top level directories in the `$HOME`folder.", + "description": "scope-home -> This scope permits access to all files and list content of top level directories in the `$HOME` folder.", "type": "string", "enum": [ "scope-home" @@ -1352,7 +1352,7 @@ ] }, { - "description": "scope-localdata -> This scope permits access to all files and list content of top level directories in the `$LOCALDATA`folder.", + "description": "scope-localdata -> This scope permits access to all files and list content of top level directories in the `$LOCALDATA` folder.", "type": "string", "enum": [ "scope-localdata" @@ -1415,7 +1415,7 @@ ] }, { - "description": "scope-log -> This scope permits access to all files and list content of top level directories in the `$LOG`folder.", + "description": "scope-log -> This scope permits access to all files and list content of top level directories in the `$LOG` folder.", "type": "string", "enum": [ "scope-log" @@ -1478,7 +1478,7 @@ ] }, { - "description": "scope-picture -> This scope permits access to all files and list content of top level directories in the `$PICTURE`folder.", + "description": "scope-picture -> This scope permits access to all files and list content of top level directories in the `$PICTURE` folder.", "type": "string", "enum": [ "scope-picture" @@ -1541,7 +1541,7 @@ ] }, { - "description": "scope-public -> This scope permits access to all files and list content of top level directories in the `$PUBLIC`folder.", + "description": "scope-public -> This scope permits access to all files and list content of top level directories in the `$PUBLIC` folder.", "type": "string", "enum": [ "scope-public" @@ -1604,7 +1604,7 @@ ] }, { - "description": "scope-resource -> This scope permits access to all files and list content of top level directories in the `$RESOURCE`folder.", + "description": "scope-resource -> This scope permits access to all files and list content of top level directories in the `$RESOURCE` folder.", "type": "string", "enum": [ "scope-resource" @@ -1667,7 +1667,7 @@ ] }, { - "description": "scope-runtime -> This scope permits access to all files and list content of top level directories in the `$RUNTIME`folder.", + "description": "scope-runtime -> This scope permits access to all files and list content of top level directories in the `$RUNTIME` folder.", "type": "string", "enum": [ "scope-runtime" @@ -1730,7 +1730,7 @@ ] }, { - "description": "scope-temp -> This scope permits access to all files and list content of top level directories in the `$TEMP`folder.", + "description": "scope-temp -> This scope permits access to all files and list content of top level directories in the `$TEMP` folder.", "type": "string", "enum": [ "scope-temp" @@ -1793,7 +1793,7 @@ ] }, { - "description": "scope-template -> This scope permits access to all files and list content of top level directories in the `$TEMPLATE`folder.", + "description": "scope-template -> This scope permits access to all files and list content of top level directories in the `$TEMPLATE` folder.", "type": "string", "enum": [ "scope-template" @@ -1856,7 +1856,7 @@ ] }, { - "description": "scope-video -> This scope permits access to all files and list content of top level directories in the `$VIDEO`folder.", + "description": "scope-video -> This scope permits access to all files and list content of top level directories in the `$VIDEO` folder.", "type": "string", "enum": [ "scope-video" diff --git a/plugins/shell/src/scope_entry.rs b/plugins/shell/src/scope_entry.rs index e40936c3..a2fb6136 100644 --- a/plugins/shell/src/scope_entry.rs +++ b/plugins/shell/src/scope_entry.rs @@ -19,7 +19,7 @@ pub struct Entry { /// It can start with a variable that resolves to a system base directory. /// The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, /// `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, - /// `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, + /// `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, /// `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`. // use default just so the schema doesn't flag it as required #[serde(rename = "cmd")]