method
copy_metadata
copy_metadata(path)
public
Hide source
# File lib/fileutils.rb, line 1269 def copy_metadata(path) st = lstat() File.utime st.atime, st.mtime, path begin File.chown st.uid, st.gid, path rescue Errno::EPERM # clear setuid/setgid File.chmod st.mode & 01777, path else File.chmod st.mode, path end end