This repository has been archived by the owner on Jul 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Stats
Oliver Foster edited this page Jun 22, 2017
·
13 revisions
A collection of Stat
objects created by Globs.stats
and related functions.
Stats[] { // Extends ASyncIterator
constructor(Globs:globs, options),
pluck(attr), // Create an array of values, returns Array[Value]
filter(at, by), // Create a Stats of filtered, returns ASyncIterator:Stats[]
filter(by), // Create a Stats of filtered, returns ASyncIterator:Stats[]
clone(), // Clone items and their children
update([options]), // Update items and their children
// Move items to location
move(to, [options]), // returns Promise
move([options]), // returns Promise
// Copy items to location
copy(to, [options]), // returns Promise
copy([options]), // returns Promise
// Collate items to location on location fragment
collate(on, to, [options]), // returns Promise
collate([options]), // returns Promise
// Delete items
delete() // returns Promise
}
globs = Globs
attr = "attributeName" || function(item, index) { return value; }
at = "attributeName"
by = "attributeName" || function(item, index) { return true; } || { "attrName": value }
Stats[] { // Extends ASyncIterator
update({
force: undefined, // update all
timestamp: undefined, // update after timestamp
age: undefined // milliseconds from now
}),
move({
to,
overwriteOlder: true,
overwriteSame: false,
overwriteNewer: false,
force: false,
files: true,
dirs: true,
sync: false,
syncCopy: false,
includeParentDirs: true
}), // returns Promise
copy({
to,
overwriteOlder: true,
overwriteSame: false,
overwriteNewer: false,
force: false,
files: true,
dirs: true,
sync: false,
syncCopy: false,
includeParentDirs: true
}), // returns Promise
collate({
on,
to,
overwriteOlder: true,
overwriteSame: false,
overwriteNewer: false,
force: false,
files: true,
dirs: true,
sync: false,
syncCopy: false,
includeParentDirs: true
}) // returns Promise
}