| 2876 | return FS.mkdev(path, mode, dev); |
| 2877 | }, |
| 2878 | forceLoadFile(obj) { |
| 2879 | if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; |
| 2880 | if (globalThis.XMLHttpRequest) { |
| 2881 | 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."); |
| 2882 | } else { // Command-line. |
| 2883 | try { |
| 2884 | obj.contents = readBinary(obj.url); |
| 2885 | } catch (e) { |
| 2886 | throw new FS.ErrnoError(29); |
| 2887 | } |
| 2888 | } |
| 2889 | }, |
| 2890 | createLazyFile(parent, name, url, canRead, canWrite) { |
| 2891 | // Lazy chunked Uint8Array (implements get and length from Uint8Array). |
| 2892 | // Actual getting is abstracted away for eventual reuse. |