// Check if the bucket exists
Check if the bucket exists
// Check if the bucket exists
func (f *Fs) dirExists() (bool, error) {
	bucketInit, err := f.svc.Bucket(f.bucket, f.zone)
	if err != nil {
		return false, err
	}
	_, err = bucketInit.Head()
	if err == nil {
		return true, nil
	}
	if e, ok := err.(*qsErr.QingStorError); ok {
		if e.StatusCode == http.StatusNotFound {
			err = nil
		}
	}
	return false, err
}
func ( f * Fs ) dirExists ( ) ( bool , error ) { bucketInit , err := f . svc . Bucket ( f . bucket , f . zone ) if err != nil { return false , err } _ , err = bucketInit . Head ( ) if err == nil { return true , nil } if e , ok := err . ( * qsErr . QingStorError ) ; ok { if e . StatusCode == http . StatusNotFound { err = nil } } return false , err }
Check if the bucket exists
Check if the bucket exists