diff options
Diffstat (limited to 'ext/fs/30_fs.js')
-rw-r--r-- | ext/fs/30_fs.js | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/ext/fs/30_fs.js b/ext/fs/30_fs.js index b95fe623a..87607ca28 100644 --- a/ext/fs/30_fs.js +++ b/ext/fs/30_fs.js @@ -395,15 +395,6 @@ function parseFileInfo(response) { }; } -function fstatSync(rid) { - op_fs_file_stat_sync(rid, statBuf); - return statStruct(statBuf); -} - -async function fstat(rid) { - return parseFileInfo(await op_fs_file_stat_async(rid)); -} - async function lstat(path) { const res = await op_fs_lstat_async(pathFromURL(path)); return parseFileInfo(res); @@ -687,12 +678,13 @@ class FsFile { return seekSync(this.#rid, offset, whence); } - stat() { - return fstat(this.#rid); + async stat() { + return parseFileInfo(await op_fs_file_stat_async(this.#rid)); } statSync() { - return fstatSync(this.#rid); + op_fs_file_stat_sync(this.#rid, statBuf); + return statStruct(statBuf); } async syncData() { @@ -968,8 +960,6 @@ export { fdatasyncSync, File, FsFile, - fstat, - fstatSync, fsync, fsyncSync, ftruncate, |