time-to-botec/squiggle/node_modules/@stdlib/fs/exists/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

43 lines
1002 B
Plaintext

{{alias}}( path, clbk )
Asynchronously tests whether a path exists on the filesystem.
Parameters
----------
path: string|Buffer
Path to test.
clbk: Function
Callback to invoke after testing for path existence. A callback may
accept a single argument, a boolean indicating whether a path exists, or
two arguments, an error argument and a boolean, matching the error-first
callback convention used in most asynchronous Node.js APIs.
Examples
--------
> function done( error, bool ) { console.log( bool ); };
> {{alias}}( './beep/boop', done );
{{alias}}.sync( path )
Synchronously tests whether a path exists on the filesystem.
Parameters
----------
path: string|Buffer
Path to test.
Returns
-------
bool: boolean
Boolean indicating whether the path exists.
Examples
--------
> var bool = {{alias}}.sync( './beep/boop' )
<boolean>
See Also
--------