Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 4d-plugin-apple-silicon

Last synced: about 1 month ago
JSON representation

Function to create hard link, symbolic link, or Finder alias (a.k.a. bookmark)

Awesome Lists containing this project

README

        

![version](https://img.shields.io/badge/version-19%2B-5682DF)
![platform](https://img.shields.io/static/v1?label=platform&message=mac-intel%20|%20mac-arm&color=blue)
[![license](https://img.shields.io/github/license/miyako/4d-plugin-alias-manager)](LICENSE)
![downloads](https://img.shields.io/github/downloads/miyako/4d-plugin-alias-manager/total)

# 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)
```