method
copy_metadata
v1_9_2_180 -
Show latest stable
- Class:
FileUtils::Entry_
copy_metadata(path)public
No documentation available.
# File lib/fileutils.rb, line 1285
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