Skip to content

Commit 3bfed28

Browse files
committed
Rename emulation to vfs
1 parent 2ac848b commit 3bfed28

25 files changed

+21
-20
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@
4343
"exports": {
4444
".": "./dist/index.js",
4545
"./*": "./dist/*",
46-
"./promises": "./dist/emulation/promises.js",
47-
"./path": "./dist/emulation/path.js",
46+
"./emulation/*": "./dist/vfs/*",
47+
"./promises": "./dist/vfs/promises.js",
48+
"./path": "./dist/vfs/path.js",
4849
"./eslint": "./eslint.shared.js",
4950
"./tests/*": "./tests/*"
5051
},

src/backends/file_index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Note: this file is named file_index.ts because Typescript has special behavior regarding index.ts which can't be disabled. */
22

33
import { isJSON } from 'utilium';
4-
import { basename, dirname } from '../emulation/path.js';
4+
import { basename, dirname } from '../vfs/path.js';
55
import { Errno, ErrnoError } from '../error.js';
66
import { NoSyncFile, isWriteable } from '../file.js';
77
import { FileSystem } from '../filesystem.js';

src/backends/overlay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { dirname } from '../emulation/path.js';
1+
import { dirname } from '../vfs/path.js';
22
import { Errno, ErrnoError } from '../error.js';
33
import type { File } from '../file.js';
44
import { PreloadFile, parseFlag } from '../file.js';

src/backends/store/fs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { credentials } from '../../credentials.js';
2-
import { S_IFDIR, S_IFREG, S_ISGID, S_ISUID } from '../../emulation/constants.js';
3-
import { basename, dirname, parse, resolve } from '../../emulation/path.js';
2+
import { S_IFDIR, S_IFREG, S_ISGID, S_ISUID } from '../../vfs/constants.js';
3+
import { basename, dirname, parse, resolve } from '../../vfs/path.js';
44
import { Errno, ErrnoError } from '../../error.js';
55
import type { File } from '../../file.js';
66
import { PreloadFile } from '../../file.js';

src/config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import type { Backend, BackendConfiguration, FilesystemOf, SharedConfig } from '
22
import { checkOptions, isBackend, isBackendConfig } from './backends/backend.js';
33
import { useCredentials } from './credentials.js';
44
import { DeviceFS, type Device, type DeviceDriver } from './devices.js';
5-
import * as cache from './emulation/cache.js';
6-
import { config } from './emulation/config.js';
7-
import * as fs from './emulation/index.js';
8-
import { mounts } from './emulation/shared.js';
5+
import * as cache from './vfs/cache.js';
6+
import { config } from './vfs/config.js';
7+
import * as fs from './vfs/index.js';
8+
import { mounts } from './vfs/shared.js';
99
import { Errno, ErrnoError } from './error.js';
1010
import { FileSystem } from './filesystem.js';
1111

src/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
22
import { type ExtractProperties } from 'utilium';
33
import { createCredentials, credentials as defaultCredentials, type CredentialInit, type Credentials } from './credentials.js';
4-
import * as fs from './emulation/index.js';
4+
import * as fs from './vfs/index.js';
55

66
type Fn_FS = ExtractProperties<typeof fs, (...args: any[]) => any>;
77
type Fn_Promises = ExtractProperties<typeof fs.promises, (...args: any[]) => any>;

src/devices.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ This is a great resource: https://www.kernel.org/doc/html/latest/admin-guide/dev
55
import type { FileReadResult } from 'node:fs/promises';
66
import { InMemoryStore } from './backends/memory.js';
77
import { StoreFS } from './backends/store/fs.js';
8-
import { S_IFBLK, S_IFCHR } from './emulation/constants.js';
8+
import { S_IFBLK, S_IFCHR } from './vfs/constants.js';
99
import { Errno, ErrnoError } from './error.js';
1010
import { File } from './file.js';
1111
import type { StatsLike } from './stats.js';
1212
import { Stats } from './stats.js';
13-
import { basename, dirname } from './emulation/path.js';
13+
import { basename, dirname } from './vfs/path.js';
1414
import { decodeUTF8 } from './utils.js';
1515

1616
/**

src/file.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { FileReadResult } from 'node:fs/promises';
2-
import { config } from './emulation/config.js';
3-
import { O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY, S_IFMT, size_max } from './emulation/constants.js';
2+
import { config } from './vfs/config.js';
3+
import { O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY, S_IFMT, size_max } from './vfs/constants.js';
44
import { Errno, ErrnoError } from './error.js';
55
import type { FileSystem } from './filesystem.js';
66
import './polyfills.js';

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export * from './mixins/index.js';
1919
export * from './stats.js';
2020
export * from './utils.js';
2121

22-
export * from './emulation/index.js';
23-
import * as fs from './emulation/index.js';
22+
export * from './vfs/index.js';
23+
import * as fs from './vfs/index.js';
2424
export { fs };
2525
export default fs;
2626

src/mixins/async.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { StoreFS } from '../backends/store/fs.js';
22
import type { Store } from '../backends/store/store.js';
3-
import { join } from '../emulation/path.js';
3+
import { join } from '../vfs/path.js';
44
import { Errno, ErrnoError } from '../error.js';
55
import { parseFlag, PreloadFile } from '../file.js';
66
import type { FileSystem } from '../filesystem.js';

0 commit comments

Comments
 (0)