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

Directory handling #1

Closed
remram44 opened this issue Sep 26, 2013 · 2 comments
Closed

Directory handling #1

remram44 opened this issue Sep 26, 2013 · 2 comments

Comments

@remram44
Copy link
Owner

Right now the system only stores files.

There are two options for storing directories:

  • Do the same thing we do for files, hash it recursively and copy it to filename objects/filehash
    • Pros:
      • Easy
      • Keeps file structure (the user needs the system to obtain the path, but then he can access it in place)
    • Cons:
      • File duplication is possible
  • Do something similar to git, making a tree object that references other tree or blob objects
    • Pros:
      • No more duplication!
    • Cons:
      • Need for a GC (this can be made efficient by putting the SQL database to use)
      • Need to process the files to turn it back into exploitable format
      • Harder
@remram44
Copy link
Owner Author

Solution 1 implemented with 91aa4a7 (add_directory) and 2c84890 (remove())

@remram44
Copy link
Owner Author

Matthias mentioned that he needs the directories to be stored as is too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant