mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
shim more buffer methods, and fs methods
getting importer plugin to work,
This commit is contained in:
@@ -4,6 +4,7 @@ import { transport } from "./transport.js";
|
||||
import { createFsPromises } from "./promises.js";
|
||||
import { createFsSync } from "./sync.js";
|
||||
import { createFsWatch } from "./watch.js";
|
||||
import { createFdOps } from "./fd.js";
|
||||
import { constants } from "./constants.js";
|
||||
|
||||
const metadataCache = new MetadataCache();
|
||||
@@ -12,6 +13,7 @@ const contentCache = new ContentCache();
|
||||
const fsPromises = createFsPromises(metadataCache, contentCache, transport);
|
||||
const fsSync = createFsSync(metadataCache, contentCache, transport);
|
||||
const fsWatch = createFsWatch(transport);
|
||||
const fdOps = createFdOps(metadataCache, contentCache, transport);
|
||||
|
||||
export const fsShim = {
|
||||
promises: fsPromises,
|
||||
@@ -24,6 +26,15 @@ export const fsShim = {
|
||||
statSync: fsSync.statSync,
|
||||
readdirSync: fsSync.readdirSync,
|
||||
|
||||
open: fdOps.open,
|
||||
openSync: fdOps.openSync,
|
||||
read: fdOps.read,
|
||||
readSync: fdOps.readSync,
|
||||
close: fdOps.close,
|
||||
closeSync: fdOps.closeSync,
|
||||
fstat: fdOps.fstat,
|
||||
fstatSync: fdOps.fstatSync,
|
||||
|
||||
watch: fsWatch.watch,
|
||||
constants,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user