<commit_before>var exec = require('child_process').exec;

module.exports = {
	// id is an OPTIONAL argument.
	eject: function(id) {
		// are we running on mac?
		if (process.platform === 'darwin') {
			// setup optional argument, on mac, will default to 1
			id = (typeof id === 'undefined') ? 1 : id;

			exec('drutil tray eject ' + id, function(err, stdout, stderr) {
				if (err) {
					console.log('ERROR: DiskDrive, when executing bash cmd: ' + err);
					return;
				}

				// if it came here, it went all perfectly and it ejected.
			});
		// are we running on linux?
		} else if (process.platform === 'linux') {
			// setup optional argument, on linux, will default to '' (empty string)
			id = (typeof id === 'undefined') ? '' : id;

			exec('eject ' + id, function(err, stdout, stderr) {
				if (err) {
					console.log('ERROR: DiskDrive, when executing bash cmd: ' + err);
					return;
				}

				// if it came here, it went all perfectly and it ejected.
			});
		} else {
			console.log('ERROR: Unsupported DiskDrive platform (' + process.platform + ').');
		}
	}
};<commit_msg>Restructure file<commit_after>var exec = require('child_process').exec;

var self = module.exports;

self.eject = function(id) {
	// are we running on mac?
	if (process.platform === 'darwin') {
		// setup optional argument, on mac, will default to 1
		id = (typeof id === 'undefined') ? 1 : id;

		exec('drutil tray eject ' + id, function(err, stdout, stderr) {
			if (err) {
				console.log('ERROR: DiskDrive, when executing bash cmd: ' + err);
				return;
			}

			// if it came here, it went all perfectly and it ejected.
		});
	// are we running on linux?
	} else if (process.platform === 'linux') {
		// setup optional argument, on linux, will default to '' (empty string)
		id = (typeof id === 'undefined') ? '' : id;

		exec('eject ' + id, function(err, stdout, stderr) {
			if (err) {
				console.log('ERROR: DiskDrive, when executing bash cmd: ' + err);
				return;
			}

			// if it came here, it went all perfectly and it ejected.
		});
	} else {
		console.log('ERROR: Unsupported DiskDrive platform (' + process.platform + ').');
	}
};
{'fraction_non_alphanumeric': 0.1539541413196069, 'fraction_numerical': 0.0018717828731867104, 'mean_word_length': 2.973977695167286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5784624', 'n_tokens_mistral': 813, 'n_tokens_neox': 674, 'n_words': 234}