Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(examples): add UnixFS builder example with HAMT sharding #851

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

PsychoPunkSage
Copy link

Closes #663

This PR adds a new example demonstrating how to programmatically create UnixFS DAGs with features similar to ipfs add. The example shows how to:

  • Create UnixFS structures from files and directories
  • Handle large directories using HAMT sharding
  • Preserve file metadata (mtime, mode)
  • Customize chunking strategies
  • Display progress with human-readable sizes

The example includes proper error handling, tests, and documentation for common use cases. This helps developers understand how to work with UnixFS programmatically using boxo's lower-level APIs.

Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
Signed-off-by: Abhinav Prakash <[email protected]>
@PsychoPunkSage PsychoPunkSage requested a review from a team as a code owner February 20, 2025 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

example: turn directory into UnixFS DAG
1 participant