-
Notifications
You must be signed in to change notification settings - Fork 77
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
Pyfilesystem Discussion: solve fs.path / os.path mismatch keep or deprecate fs #2103
Comments
Before working on this we should talk about if we want to keep Pyfilesystem2 in our lib or replace it completly by os / pathlib. When we introduced FS we had anything using it. Over the years it gots a mixup. At the time we introduced it, there was no pathlib and we also had problems with tests on windows because of path. The idea that we use it with FS pathes seems not become the standard. We can use it with our nextcloud but we don't. etc. Let us collect pro's and con's |
related |
https://github.com/Open-MSS/MSS/pull/2405/files#r1665854420 when we want to keep fs in the future we can't use send_from_directory. We have to replace it by send_file because this can also send a BytesIO object But this also needs an intermediate step, reading the fs data into a BytesIO object. |
If we want to keep using fs and use it properly we can't use any function that expects a path-like object. What is the use case for fs, at least on the server side, anyway?
Not really, what |
In the past there was no file storage on Google Cloud Platform. |
When I look on the Release history on PyPi, https://pypi.org/project/fs/#history More than 2 years ago 2.4.16 was released. For me, that's enough to deprecate its use in our projects |
on server we should have os.path.
on ui we should have fs.path
fs.path means we can use pyfilesystem urls e.g. webdavfs or sshfs urls mapped to a "fs"path.
That means our msui_settings.json can come from a nextcloud user dir and we can save images to an fs url too.
os.path is only capable to store on local or mounted filesystems.
if ui needs an os path then it gets converted by .getsyspath()
The text was updated successfully, but these errors were encountered: