lib/net/sftp/protocol/01/attributes.rb
# Returns the user-id of the user that owns the file, or +nil+ if that
# information is not available. If an :owner key exists, but not a :uid
# key, the Etc module will be used to reverse lookup the id from the name.
# This might fail on some systems (e.g., Windows).
Returns the user-id of the user that owns the file, or +nil+ if that
information is not available. If an :owner key exists, but not a :uid
key, the Etc module will be used to reverse lookup the id from the name.
This might fail on some systems .
Returns the user - id of the user that owns the file or + nil + if that information is not available . If an : owner key exists but not a : uid key the Etc module will be used to reverse lookup the id from the name . This might fail on some systems .
def uid
      if attributes[:owner] && !attributes.key?(:uid)
        require 'etc'
        attributes[:uid] = Etc.getpwnam(attributes[:owner]).uid
      end
      attributes[:uid]
    end
def uid if attributes [ :owner ] && ! attributes . key? ( :uid ) require 'etc' attributes [ :uid ] = Etc . getpwnam ( attributes [ :owner ] ) . uid end attributes [ :uid ] end
Returns the user-id of the user that owns the file, or +nil+ if that
information is not available.
Returns the user - id of the user that owns the file or + nil + if that information is not available .