Method: Etch::Client#compare_ownership
- Defined in:
- lib/etch/client.rb
#compare_ownership(file, uid, gid) ⇒ Object
Returns true if the ownership of the given file match the given UID and GID, false otherwise.
2235 2236 2237 2238 2239 2240 2241 2242 2243 |
# File 'lib/etch/client.rb', line 2235 def compare_ownership(file, uid, gid) if File.exist?(file) st = File.lstat(file) if st.uid == uid && st.gid == gid return true end end false end |