// SetModTime sets the modification time of the local fs object
SetModTime sets the modification time of the local fs object
// SetModTime sets the modification time of the local fs object
func (o *Object) SetModTime(ctx context.Context, modTime time.Time) error {
	err := o.readMetaData()
	if err != nil {
		return err
	}
	o.lastModified = modTime
	mimeType := fs.MimeType(ctx, o)
	if o.size >= maxSizeForCopy {
		fs.Debugf(o, "SetModTime is unsupported for objects bigger than %v bytes", fs.SizeSuffix(maxSizeForCopy))
		return nil
	}
	key := o.fs.root + o.remote
	sourceKey := path.Join("/", o.fs.bucket, key)
	bucketInit, err := o.fs.svc.Bucket(o.fs.bucket, o.fs.zone)
	if err != nil {
		return err
	}
	req := qs.PutObjectInput{
		XQSCopySource: &sourceKey,
		ContentType:   &mimeType,
	}
	_, err = bucketInit.PutObject(key, &req)
	return err
}
func ( o * Object ) SetModTime ( ctx context . Context , modTime time . Time ) error { err := o . readMetaData ( ) if err != nil { return err } o . lastModified = modTime mimeType := fs . MimeType ( ctx , o ) if o . size >= maxSizeForCopy { fs . Debugf ( o , " " , fs . SizeSuffix ( maxSizeForCopy ) ) return nil } key := o . fs . root + o . remote sourceKey := path . Join ( " " , o . fs . bucket , key ) bucketInit , err := o . fs . svc . Bucket ( o . fs . bucket , o . fs . zone ) if err != nil { return err } req := qs . PutObjectInput { XQSCopySource : & sourceKey , ContentType : & mimeType , } _ , err = bucketInit . PutObject ( key , & req ) return err }
SetModTime sets the modification time of the local fs object
SetModTime sets the modification time of the local fs object
// Copy the object to itself to update the metadata