Sha256: 51c157a0b05cd941ec025ff84f1df77d13f056c6b0db23ea563248117732f751
Contents?: true
Size: 434 Bytes
Versions: 2
Compression:
Stored size: 434 Bytes
Contents
# List all the files in a Tree of Directories if phantom.args.length != 1 console.log "Usage: phantomjs scandir.js DIRECTORY_TO_SCAN" phantom.exit() scanDirectory = (path) -> fs = require 'fs' if fs.exists(path) and fs.isFile(path) console.log path else if fs.isDirectory(path) fs.list(path).forEach (e) -> scanDirectory path + "/" + e if e != "." and e != ".." scanDirectory phantom.args[0] phantom.exit()
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
phantomjs.rb-0.0.2 | vendor/phantomjs-1.4.1_OSX/examples/scandir.coffee |
phantomjs.rb-0.0.1 | vendor/phantomjs-1.4.1_OSX/examples/scandir.coffee |