Method: COS::ResourceOperator#update

Defined in:
lib/cos/resource.rb

#update(biz_attr) ⇒ Object

Note:

根目录(‘/’) 不可更新, 否则会抛出异常

更新当前资源的属性

Examples:

resource.update('i am the attr')

Parameters:

  • 目录/文件属性,业务端维护

Raises:

  • 服务端异常返回



170
171
172
173
174
175
# File 'lib/cos/resource.rb', line 170

def update(biz_attr)
  bucket.update(path, biz_attr)
  @mtime    = Time.now.to_i.to_s
  @biz_attr = biz_attr
  self
end