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

Create root resource from directory #353

Open
csisl opened this issue Jul 28, 2023 · 4 comments
Open

Create root resource from directory #353

csisl opened this issue Jul 28, 2023 · 4 comments

Comments

@csisl
Copy link

csisl commented Jul 28, 2023

What is the use case for the feature?

If a file has already been extracted, let the user create a resource for the root directory of that output.

An example scenario:

A compressed file is extracted, but not recursively. The process ends and only some files have been extracted. Later, if the user wants to extract other files, they would have to start over by unpacking the original compressed file.

Rather than re-extracting from the top-level, let the user resume where they left off and navigate the resource by creating a resource from a root directory.

Does the feature contain any proprietary information about another company's intellectual property?

No

How would you implement this feature?

Inside of ofrak_context.py, implement a create_root_resource_from_directory('/path/to/dir') method. Then the method filesystem.py:initialize_from_disk('/path/to/dir') can be called so that all children and grandchildren in the directory can be registered.

This would make it easy to resume extraction if the process spans multiple runs.

@whyitfor
Copy link
Contributor

I like this idea! I actually found myself wishing this was possible recently as well.

@EdwardLarson, @rbs-jacob, what are your thoughts on adding this higher-level API?

@EdwardLarson
Copy link
Collaborator

Yup, this is sensible and straightforward, I like it.

@whyitfor
Copy link
Contributor

@csisl, do you have any interest in implementing this?

Figured giving you first dibs makes sense as it was your idea:)

@csisl
Copy link
Author

csisl commented Jul 29, 2023

Thank you for asking, but you guys can go ahead

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

No branches or pull requests

3 participants