Skip to content

Commit

Permalink
Updated core and FileSystemAccess
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Apr 2, 2024
1 parent 1a87b32 commit 9f80c1f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
"typescript": "5.2.2"
},
"peerDependencies": {
"@zenfs/core": "^0.4.0"
"@zenfs/core": "^0.5.0"
}
}
8 changes: 4 additions & 4 deletions src/FileSystemAccess.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { basename, dirname, join } from '@zenfs/core/emulation/path.js';
import { ApiError, ErrorCode } from '@zenfs/core/ApiError.js';
import { FileFlag, PreloadFile } from '@zenfs/core/file.js';
import { PreloadFile } from '@zenfs/core/file.js';
import { FileSystem, Async, type FileSystemMetadata } from '@zenfs/core/filesystem.js';
import { Stats, FileType } from '@zenfs/core/stats.js';
import type { Backend } from '@zenfs/core/backends/backend.js';
Expand All @@ -27,7 +27,7 @@ const handleError = (path = '', error: Error) => {
};

export class FileSystemAccessFile extends PreloadFile<FileSystemAccessFS> {
constructor(_fs: FileSystemAccessFS, _path: string, _flag: FileFlag, _stat: Stats, contents?: Uint8Array) {
constructor(_fs: FileSystemAccessFS, _path: string, _flag: string, _stat: Stats, contents?: Uint8Array) {
super(_fs, _path, _flag, _stat, contents);
}

Expand Down Expand Up @@ -125,7 +125,7 @@ export class FileSystemAccessFS extends Async(FileSystem) {
await writable.close();
}

public async createFile(path: string, flag: FileFlag): Promise<FileSystemAccessFile> {
public async createFile(path: string, flag: string): Promise<FileSystemAccessFile> {
await this.writeFile(path, new Uint8Array());
return this.openFile(path, flag);
}
Expand All @@ -144,7 +144,7 @@ export class FileSystemAccessFS extends Async(FileSystem) {
}
}

public async openFile(path: string, flag: FileFlag): Promise<FileSystemAccessFile> {
public async openFile(path: string, flag: string): Promise<FileSystemAccessFile> {
const handle = await this.getHandle(path);
if (handle instanceof FileSystemFileHandle) {
const file = await handle.getFile();
Expand Down

0 comments on commit 9f80c1f

Please sign in to comment.