https://github.com/miyako/4d-plugin-alias-manager
Function to create hard link, symbolic link, or Finder alias (a.k.a. bookmark)
https://github.com/miyako/4d-plugin-alias-manager
4d-plugin
Last synced: 4 months ago
JSON representation
Function to create hard link, symbolic link, or Finder alias (a.k.a. bookmark)
- Host: GitHub
- URL: https://github.com/miyako/4d-plugin-alias-manager
- Owner: miyako
- License: mit
- Created: 2014-11-12T19:04:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-07-29T04:38:00.000Z (almost 3 years ago)
- Last Synced: 2025-01-08T17:57:28.604Z (6 months ago)
- Topics: 4d-plugin
- Language: C
- Homepage:
- Size: 4.61 MB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README


[](LICENSE)
# 4d-plugin-alias-manager
Function to create hard link, symbolic link, or Finder alias (a.k.a. bookmark).``ALIAS Create`` returns 1 on success, or 0 on failure or if the destination file already exists.
``ALIAS Resolve`` returns in ``$2`` the alias type or ``-1`` if the file can't be resolved. It first attempts to resolve it as a symbolic link, then as a bookmark (Finder alias). Note that there is no concept of "resolving" a hard link. All hard links to the same file node are considered "real" paths. Normally, when a hard link is passed, the original path is returned.
### Examples
```
$source:=Structure file
$target:=System folder(Desktop)+"test"
//result:=ALIAS Create ($source;$target;Link Symbolic)
result:=ALIAS Create ($source;$target;Link Alias)
//$result:=ALIAS Create ($source;$target;Link Hard)$resolved:=ALIAS Resolve ($target;$aliasType)
```