45 lines
854 B
Plaintext
45 lines
854 B
Plaintext
|
|
{{alias}}( path, clbk )
|
|
Asynchronously reads the contents of a directory.
|
|
|
|
Parameters
|
|
----------
|
|
path: string|Buffer
|
|
Directory path.
|
|
|
|
clbk: Function
|
|
Callback to invoke after reading directory contents.
|
|
|
|
Examples
|
|
--------
|
|
> function onRead( error, data ) {
|
|
... if ( error ) {
|
|
... console.error( error.message );
|
|
... } else {
|
|
... console.log( data );
|
|
... }
|
|
... };
|
|
> {{alias}}( './beep/boop', onRead );
|
|
|
|
|
|
{{alias}}.sync( path )
|
|
Synchronously reads the contents of a directory.
|
|
|
|
Parameters
|
|
----------
|
|
path: string|Buffer
|
|
Directory path.
|
|
|
|
Returns
|
|
-------
|
|
out: Error|Array|Array<string>
|
|
Directory contents.
|
|
|
|
Examples
|
|
--------
|
|
> var out = {{alias}}.sync( './beep/boop' );
|
|
|
|
See Also
|
|
--------
|
|
|