   $$.mkdir(source)
   $$.read(source)
   $$.remove(source)
+  $$.rm(source)
+  $$.write(source, data)
 
 ###
 


  it "$$.backup('./temp/readme.md')", co ->

    yield $$.copy './readme.md', './temp'

    yield $$.backup './temp/readme.md'

    unless yield $$.isExisted './temp/readme.md.bak'
      throw new Error()

    sourceData = yield $$.read './temp/readme.md'
    targetData = yield $$.read './temp/readme.md.bak'

    unless sourceData.toString() == targetData.toString()
      throw new Error()

    # clean

      throw new Error()

    # clean
    yield $$.remove './temp'

describe '$$.rm(source)', ->

  it '$$.rm()', ->

    if $$.rm != $$.remove
      throw new Error()

describe '$$.write(source, data)', ->

  it "$$.write('./temp/wr/ite.txt', 'a test message')", co ->

    source = './temp/wr/ite.txt'
    string = 'a test message'

    yield $$.write source, string

    unless yield $$.isExisted source
      throw new Error()

    cont = yield $$.read source

    if cont != string
      throw new Error()

    # clean
    yield $$.remove './temp'

  it "$$.write('./temp/wr/ite.json', {message: 'a test message'})", co ->

    source = './temp/wr/ite.json'
    string = 'a test message'
    object = message: string

    yield $$.write source, object

    unless yield $$.isExisted source
      throw new Error()

    cont = yield $$.read source

    if cont.message != string
      throw new Error()

    # clean
    yield $$.remove './temp'