GitXplorerGitXplorer
h

largest-file

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
398f36b801d87b6ca4c927e19532b2d3fc87f53c

Initial commit

hhaio committed 10 years ago

README

The README file for this repository.

Largest File

Find the largest file in a specify directory

Usage

CO style

largest = thunkify(largest);
co(function *() {
    try {
        var largestFile = yield largest(dir);
        console.log('The largest file in %s is %s', dir, largestFile);
    } catch (e) {
        console.log('Oh, got error!');
    }
})();

Callback style

largest(dir, function (err, largestFile) {
    console.log('The largest file in %s is %s', dir, largestFile);
});