class File

def self.extname(path)

def self.extname(path)
  return '' if path.nil_or_empty?
  last_dot_idx = path[1..-1].rindex('.')
  last_dot_idx.nil? ? '' : path[(last_dot_idx + 1)..-1]
end