Skip to content

Commit 5b19f2b

Browse files
committed
feat(ipip-0499): document symlink handling in profiles
- add Symlinks parameter to UnixFS parameters list - add Symlinks row to unixfs-2025 (TODO) and legacy profiles tables - kubo: preserved, helia/storacha: followed, dasl: not specified - add terminology for preserved/followed with UnixFS spec reference - clarify kubo --dereference-args behavior
1 parent a3044d6 commit 5b19f2b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/ipips/ipip-0499.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ Here is the complete set of UnixFS parameters that affect the resulting string e
5757
1. Whether hidden entities (including dot files) are included in the DAG. Some implementations may apply filtering.
5858
1. Directory wrapping for single files: in order to retain the name of a single file, some implementations have the option to wrap the file in a `Directory` with link to the file.
5959
1. Presence and accurate setting of `Tsize`.
60+
1. Symlink handling: preserved as UnixFS Type=4 nodes, or followed (dereferenced to target).
6061

61-
The handling of symlinks and symlink follows is defined by the [UnixFS](https://specs.ipfs.tech/unixfs/) spec.
62+
The [UnixFS spec](https://specs.ipfs.tech/unixfs/) defines Type=4 for symlinks with target path stored in the Data field.
6263

6364
## CID profiles
6465

@@ -79,6 +80,7 @@ The initial profile in the series, **`unixfs-2025`**, captures the baseline defa
7980
| Leaves | raw |
8081
| Empty directories | TODO (kubo needs opt-out flag) |
8182
| Hidden entities | TODO |
83+
| Symlinks | TODO (preserved?) |
8284

8385
## Legacy profiles
8486

@@ -98,12 +100,15 @@ We also define a series of **legacy profiles**, used by various implementations
98100
| Leaves | dag-pb | raw | raw | raw | raw | not specified |
99101
| Empty directories | included | included | excluded | included | included | not specified |
100102
| Hidden entities | opt-in | opt-in | opt-in | opt-in | opt-in | not specified |
103+
| Symlinks | preserved | followed | followed | preserved | preserved | not specified |
101104

102105
**Terminology:**
103106
- `included`: Always included in the DAG (no option to exclude)
104107
- `excluded`: Always excluded from the DAG (no option to include)
105108
- `opt-in`: Excluded by default; implementations provide a flag to include (e.g., `--hidden` in Kubo/Storacha, `hidden: true` in Helia)
106109
- `opt-out`: Included by default; implementations provide a flag to exclude
110+
- `preserved`: Symlinks stored as UnixFS Type=4 nodes with target path (per [UnixFS spec](https://specs.ipfs.tech/unixfs/)). Note: Kubo (v0.39) `--dereference-args` only follows symlinks passed as CLI arguments; symlinks found during recursive traversal are always preserved.
111+
- `followed`: Symlinks dereferenced and treated as target files/directories
107112

108113
See related discussion at https://discuss.ipfs.tech/t/should-we-profile-cids/18507/
109114

0 commit comments

Comments
 (0)