If you do $dir_source->move($dir_target) to rename a directory, according to the docs it should return the new path ($dir_target), but instead it returns $dir_target->child($dir_source->basename). It seems from the implementationm and is sort of implied by the docs, that the source should only be a file, but if the source is a directory, the rename does succeed.