summaryrefslogtreecommitdiff
path: root/ext/fs
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-09-04 11:28:15 +1000
committerGitHub <noreply@github.com>2024-09-04 01:28:15 +0000
commitb72d1a7256fd141c644024b8d9e15fa11234109e (patch)
tree584371371cf343a407b3881a1300b9da1cc186da /ext/fs
parent105c571fb6ba4d9b9404b5998eb6e17f0efdd79f (diff)
BREAKING(fs): remove `Deno.fstat[Sync]()` (#25351)
Towards #22079 Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Diffstat (limited to 'ext/fs')
-rw-r--r--ext/fs/30_fs.js18
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,