Skip to content

Commit c4397bd

Browse files
[fs] Add Tip for LitlerLeadingDot (#3145)
Co-authored-by: FabianLars <[email protected]>
1 parent a09c7f0 commit c4397bd

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/content/docs/plugin/file-system.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,24 @@ use the the object form of permissions `{ "identifier": string, "allow"?: [], "d
712712
In the above example you can use the [`exists`](#exists) API using any `$APPDATA` sub path (does not include sub-directories)
713713
and the [`rename`](#rename)
714714

715+
:::tip
716+
If you are trying to access dotfiles (e.g. `.gitignore`) or dotfolders (e.g. `.ssh`) on Unix based systems,
717+
then you need to specify either the full path `/home/user/.ssh/example` or the glob after the dotfolder path
718+
component `/home/user/.ssh/*`.
719+
720+
If that does not work in your use case then you can configure the plugin to treat any component
721+
as a valid path literal.
722+
723+
```json title="src-tauri/tauri.conf.json
724+
"plugins": {
725+
"fs": {
726+
"requireLiteralLeadingDot": false
727+
}
728+
}
729+
```
730+
731+
:::
732+
715733
[NSPrivacyAccessedAPICategoryFileTimestamp]: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278393
716734
[C617.1]: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278393
717735
[base directory]: /reference/javascript/api/namespacepath/#basedirectory

0 commit comments

Comments
 (0)