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

Consider using pyfilesystem2 for FS classes #25

Open
ihaveamac opened this issue Jun 16, 2023 · 0 comments
Open

Consider using pyfilesystem2 for FS classes #25

ihaveamac opened this issue Jun 16, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@ihaveamac
Copy link
Owner

I think using this for things like SD and NAND would make things easier to combine it with the rest of the modules.

For example SDFilesystem could use this and then SDTitle just needs to be passed an fs object (which could be SDFilesystem or anything else). The main problem here is compatibility, since SDFilesystem already exists and trying to match the fs api may cause conflicts. (This needs to be researched and tested though. Maybe introduce an sdfs module with an "SDFS" class and deprecate the sd module. Handling ID1 here would have to be re-thought.)

For NAND, this would make it easier to use other stuff like SDTitle on stuff in CTRNAND. Doing so is awkward right now because PyCTR itself does not depend on pyfilesystem2 or pyfatfs, so handling titles and stuff inside the NAND has to be done manually (SDTitle and other stuff expect to be given OS filesystem paths, but with one exception for SDFilesystem).

RomFSReader could also benefit from this. The API is kinda awkward compared to any other filesystem classes.

And also accepting pyfilesystem2 fs paths or objects in any class would increase the possible locations to read files and all that.

(A lot of this was written late at night and so could be wrong or written weirdly, but I had to get these ideas written down or I would forget.)

@ihaveamac ihaveamac added the enhancement New feature or request label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant