Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

azuki-trusty / azk   deb

Repository URL to install this package:

Version: 0.5.1 

/ usr / lib / azk / node_modules / touch / test / sanity.js

var fs = require("fs")
var touch = require("../touch.js")

function _ (fn) { return function (er) {
  if (er) throw er
  fn()
}}

touch.sync("sync")
touch("async", _(function () {
  console.log("async", fs.statSync("async"))
  console.log("sync", fs.statSync("sync"))

  setTimeout(function () {
    touch.sync("sync")
    touch("async", _(function () {
      console.log("async", fs.statSync("async"))
      console.log("sync", fs.statSync("sync"))
      setTimeout(function () {
        touch.sync("sync")
        touch("async", _(function () {
          console.log("async", fs.statSync("async"))
          console.log("sync", fs.statSync("sync"))
          fs.unlinkSync("sync")
          fs.unlinkSync("async")
        }))
      }, 1000)
    }))
  }, 1000)
}))