We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Example
with TempFS() as temp_fs: temp_fs_sys_path = temp_fs.root_path # raises AttributeError since temp_fs is of type FS
To get around this you need to do: temp_fs_root_sys_path = temp_fs.getsyspath('')
temp_fs_root_sys_path = temp_fs.getsyspath('')
There may be other OSFS/TempFS specific attributes that may fail due to this. TempFS.__enter__ return type should be TempFS, not FS.
OSFS
TempFS
TempFS.__enter__
FS
The text was updated successfully, but these errors were encountered:
temp_fs.root_path
Neither https://docs.pyfilesystem.org/en/latest/reference/tempfs.html nor https://docs.pyfilesystem.org/en/latest/reference/osfs.html document the .root_path attribute as part of the "public API" ? In fact the example at https://docs.pyfilesystem.org/en/latest/reference/tempfs.html#fs.tempfs.TempFS.close shows
.root_path
syspath = tmp_fs.getsyspath("/")
Sorry, something went wrong.
No branches or pull requests
Example
To get around this you need to do:
temp_fs_root_sys_path = temp_fs.getsyspath('')
There may be other
OSFS
/TempFS
specific attributes that may fail due to this.TempFS.__enter__
return type should beTempFS
, notFS
.The text was updated successfully, but these errors were encountered: