function open( path, flags, mode, clbk ) { // eslint-disable-line stdlib/no-redeclare
	var nargs = arguments.length;
	if ( nargs === 2 ) {
		return op( path, defaults.flags, defaults.mode, flags );
	}
	if ( nargs === 3 ) {
		return op( path, flags, defaults.mode, mode );
	}
	op( path, flags, mode, clbk );
}
Asynchronously opens a file.

@param {(string|Buffer)} path - file path
@param {(string|number)} [flags='r'] - file system flags
@param {integer} [mode=0o666] - file mode
@param {Function} clbk - callback to invoke after opening a file
@returns {void}

@example
var closeSync = require( '@stdlib/fs/close' ).sync;
var open = require( '@stdlib/fs/open' );

function onOpen( error, fd ) {
    if ( error ) {
        throw error;
    }
    closeSync( fd );
}
open( __filename, onOpen );