INNER CODE UNIT · JavaScript

stdin

xonotic/darkplaces · wasm/pre.js:20

		function stdin(){
			return '\n';  // Return a newline/line feed character so the user is not prompted for input
		};
		FS.init(stdin, null, null); // null for both stdout and stderr

		function createParentDirectory(filePath) {
			//
			// Split a filePath into parts, create the directory hierarchy
			//
			parts = filePath.split('/');
			for (let i = parts.length - 1; i > 0; i--) {
				localDir = '/game/' + parts.slice(0, -i).join('/')
				try {
					FS.mkdir(localDir);
				}
				catch {
					// Directory already exists
				}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…