Skip to content
This repository was archived by the owner on Dec 6, 2022. It is now read-only.

Propose symlinks #16

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,19 @@ The value of the map is another CBOR map with the following standard fields:
- `size`: Integer. Cumulative size of all directories and files in `data`.

The `type` field set to `dir`.

## IPLD `symlink`

A symlink object conceptually stores a path to another file.

Symlink content is really just a string, and could be any string, but it is
normally expected to be a file. It may be a relative or absolute path; and
there is no guarantee that it is a clean or normalized path. There is no
guarantee that the path that a symlink points to will exist.

A symlink object has the following fields:

- `type`: String with the value of `'sym'`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the type field for differentiation was also suggested by @Stebalien at some point. I like this approach as well, it allows you to more easily drop out of support for special types when you haven't implemented them.

- `target`: A string which is the target path of the symlink.

The `type` field must be set to `sym`.