本文介绍如何判断文件是否存在。

通过get接口判断文件是否存在:

client.get(object).then((result) => {
      if (result.res.status == 200) {
        return true
      }
  }).catch((e)=> {
    if (e.code == 'NoSuchKey') {
      return false
    }
  })
说明 get接口的更多应用,请参见下载文件