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

Folders #74

Merged
merged 13 commits into from
Feb 7, 2020
Merged

Folders #74

merged 13 commits into from
Feb 7, 2020

Conversation

sanderpick
Copy link
Member

@sanderpick sanderpick commented Feb 6, 2020

Closes #68 (different implementation than originally expected)
Closes #69 (different implementation than originally expected)

This adds folder handling to the Files API, which involved removing the Files collection and the File model in place of Folders and a Folder model. Files are handled under the hood by the IPFS Files API. Folders are just IPFS Directories.

Demos

Next Steps

This PR adds some low-ish-level APIs and commands for managing files and folder. Next, I'd like to add some higher level commands for syncing folders (these may require some merge handling, not sure yet):

  • textile push <folder> (push latest)
  • textile pull <folder> (pull whatever the remote has)

@sanderpick sanderpick self-assigned this Feb 6, 2020
@sanderpick sanderpick marked this pull request as ready for review February 7, 2020 17:16
cmd/textile/main.go Outdated Show resolved Hide resolved
Path: "Path",
}, {
Path: "Name",
Unique: true,
Copy link
Member Author

Choose a reason for hiding this comment

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

A project can only have one folder by a given name. Question: Maybe we can use "bucket" instead of "folder"? Too close to S3?

Signed-off-by: Sander Pick <[email protected]>
Copy link
Contributor

@jsign jsign left a comment

Choose a reason for hiding this comment

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

Very nice! 💯
I left some questions and comments.

api/client/client.go Outdated Show resolved Hide resolved
api/client/client_test.go Show resolved Hide resolved
api/service.go Show resolved Hide resolved
api/service.go Show resolved Hide resolved
api/service.go Show resolved Hide resolved
api/service.go Show resolved Hide resolved
api/service.go Outdated Show resolved Hide resolved
api/service.go Outdated Show resolved Hide resolved
api/service.go Outdated Show resolved Hide resolved
api/service.go Show resolved Hide resolved
Copy link
Member

@asutula asutula left a comment

Choose a reason for hiding this comment

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

Not much to add considering @jsign's thorough review. Looking forward to reading the replies on his comments. Looks good in general.

api/service.go Outdated Show resolved Hide resolved
cmd/textile/main.go Outdated Show resolved Hide resolved
Signed-off-by: Sander Pick <[email protected]>
@sanderpick
Copy link
Member Author

Thanks for the review, guys! I've addresses or created issues for the relevant comments.

@sanderpick sanderpick merged commit 015009f into master Feb 7, 2020
@sanderpick sanderpick deleted the sander/more-files branch February 7, 2020 22:34
@sanderpick sanderpick mentioned this pull request Feb 7, 2020
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.

Add an entire directory of files Include parent in File model
3 participants