Skip to content

Commit

Permalink
Added missing Sync methods: read and write
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Jan 21, 2025
1 parent 71fb8c8 commit 2638e5b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/mixins/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ export function Sync<T extends typeof FileSystem>(FS: T): Mixin<T, AsyncFSMethod
public async sync(path: string, data: Uint8Array, stats: Readonly<StatsLike>): Promise<void> {
return this.syncSync(path, data, stats);
}

public async read(path: string, buffer: Uint8Array, offset: number, end: number): Promise<void> {
return this.readSync(path, buffer, offset, end);
}

public async write(path: string, buffer: Uint8Array, offset: number): Promise<void> {
return this.writeSync(path, buffer, offset);
}
}
return SyncFS;
}
Expand Down

0 comments on commit 2638e5b

Please sign in to comment.