| 2997 | return FS.mkdev(path, mode, dev); |
| 2998 | }, |
| 2999 | forceLoadFile(obj) { |
| 3000 | if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; |
| 3001 | if (globalThis.XMLHttpRequest) { |
| 3002 | abort("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."); |
| 3003 | } else { // Command-line. |
| 3004 | try { |
| 3005 | obj.contents = readBinary(obj.url); |
| 3006 | } catch (e) { |
| 3007 | throw new FS.ErrnoError(29); |
| 3008 | } |
| 3009 | } |
| 3010 | }, |
| 3011 | createLazyFile(parent, name, url, canRead, canWrite) { |
| 3012 | // Lazy chunked Uint8Array (implements get and length from Uint8Array). |
| 3013 | // Actual getting is abstracted away for eventual reuse. |