Вопрос

Can someone explain me exactly (better if with examples) the meaning of the dereference_root option in FileUtils.cp_r and in other class method of the same class?

Thank you in advance.

Это было полезно?

Решение

It applies only if your source file/directory is symbolic link. If it is and you specify this option, then FileUtils.cp_r will follow this link and copy the original files otherwise you will get just a copy of the symlink.

But this doesn't apply recursively. So if you will have other symlinks inside your source folder they will be just copied as is, without 'dereferencing'.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top