cyberpanel
cyberpanel copied to clipboard
[Feature] Cleaning up filemanager.py and using pathlib instead
Describe the feature There's a lot of stuff in filemanager.py that generally doesn't need to be there. Iterating through multiple indexes just isn't a great look, honestly. Pathlib is in the standard library, is designed to work with paths, and will generally make filemanager.py so much more readable.
I plan on working on this. Just putting this here for documentation purposes.
It may not be able to run as user... ?
@usmannasir Why do you say that?
Even though both /usr/local/CyberPanel/bin/pip freeze
/ /usr/local/CyberCP/bin/pip freeze
don't show pathlib, you can still run either interpreter and import pathlib
works, since pathlib
is part of the standard library.
The reason we use commands are to make sure code run as the user.