Published Working Tree
Read file-trees from disk and compare against a published tree. Used in Patchwork to drive publishing interfaces.
Usage
var pwt = // symbols used in tree to refer to non-file attributespwtTYPE // 'directory' or 'file'pwtSTAT // fs.StatpwtNAME // StringpwtPATH // PathpwtPUBLISHED // BooleanpwtMODIFIED // BooleanpwtDELETED // BooleanpwtACTIVE // BooleanpwtDIRREAD // Boolean // load working tree from disk, compared against a published treepwt // read all of the directory tree, without a published tree to compare againstvar working = {}pwt // read just one directoryvar working = {}pwt // enumerate modifications to be publishedpwt// => { adds: [..], dels: [..], mods: [..] } // get change-state of itempwt// => 'mod', 'add', or 'del'