For example, if there exists a nonempty file in the mounted directory which is opened (for example) for reading and then again (by a different process) for read/write with the truncate flag, i.e.
os.open(FILENAME, os.O_RDWR | os.O_TRUNC)
it is not truncated.
This is because the inode exists in self._inode_fd_map and os.open with the new flags is not executed by the open method.
For example, if there exists a nonempty file in the mounted directory which is opened (for example) for reading and then again (by a different process) for read/write with the truncate flag, i.e.
os.open(FILENAME, os.O_RDWR | os.O_TRUNC)it is not truncated.
This is because the
inodeexists inself._inode_fd_mapandos.openwith the new flags is not executed by theopenmethod.