-
-
Notifications
You must be signed in to change notification settings - Fork 186
Closed
Labels
Description
I've got some strange behavior that I cannot explain.
I'm creating a file Old-name.txt on a MemoryFS, then moving it to a new location under a new name.
Problem is it still has the old name.
Testcase:
import fs
from fs.move import move_file
with fs.open_fs("mem://") as mem:
old = mem.makedir("Old")
new = mem.makedir("New")
old.writetext("Old-name.txt", "Some content")
print("Before:")
mem.tree()
move_file(
src_fs=mem,
src_path="Old/Old-name.txt",
dst_fs=mem,
dst_path="New/New-name.txt",
)
print("After: (Still the old name)")
mem.tree()Output:
Before:
├── New
└── Old
└── Old-name.txt
After: (Still the old name)
├── New
│ └── Old-name.txt
└── Old