Link Rule
Rule
TIP
$persist_dir is the Scoop persistence directory.
- If there is
$home, replace it with$persist_dir. - Otherwise, replace the drive letter with
$persist_dir.
Example
- Microsoft.VisualStudioCode stores its data in
$env:AppData\Codeand$home\.vscode $env:AppData=$home\AppData\Roaming$persist_dir=D:\scoop\persist\Microsoft.VisualStudioCode- It will link:
$home\AppData\Roaming\Code=>$persist_dir\AppData\Roaming\Code$home\.vscode=>$persist_dir\.vscode
- It directly uses the following way to define the link in abyss:json
"link": [ "$env:AppData\\Code", "$home\\.vscode" ], - abyss only needs you to specify the data directories, and it does not need to specify the target directory.
- This ensures the uniformity of data persistence, and also lowers the risk of errors and cognitive load in manually defining directory structures.