Returns a mutation that can be applied to a `Store`. The mutation will set the contents of the file at `path` to `body` iff `rev` is greater than of equal to the file's revision at the time of application, with one exception: if `rev` is Clobber, the file will be set unconditionally.
(path, body string, rev int64)
| 129 | // of equal to the file's revision at the time of application, with |
| 130 | // one exception: if `rev` is Clobber, the file will be set unconditionally. |
| 131 | func EncodeSet(path, body string, rev int64) (mutation string, err os.Error) { |
| 132 | if err = checkPath(path); err != nil { |
| 133 | return |
| 134 | } |
| 135 | return strconv.Itoa64(rev) + ":" + path + "=" + body, nil |
| 136 | } |
| 137 | |
| 138 | // Returns a mutation that can be applied to a `Store`. The mutation will cause |
| 139 | // the file at `path` to be deleted iff `rev` is greater than |