summaryrefslogtreecommitdiff
path: root/ext/fs/30_fs.js
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-09-04 18:53:43 +1000
committerGitHub <noreply@github.com>2024-09-04 08:53:43 +0000
commit3d36cbd056292e0a89d282fa84b7198ae38be4cc (patch)
tree11d0b88b68fe104958584b9c4abf7f80bbd3e3a6 /ext/fs/30_fs.js
parentac33fc2892f8faf9484c31c2aabfdc3744de0314 (diff)
BREAKING(fs): remove `Deno.ftruncate[Sync]()` (#25412)
Towards #22079 Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Diffstat (limited to 'ext/fs/30_fs.js')
-rw-r--r--ext/fs/30_fs.js16
1 files changed, 3 insertions, 13 deletions
diff --git a/ext/fs/30_fs.js b/ext/fs/30_fs.js
index 87607ca28..35bf0e712 100644
--- a/ext/fs/30_fs.js
+++ b/ext/fs/30_fs.js
@@ -19,11 +19,11 @@ import {
op_fs_fdatasync_sync,
op_fs_file_stat_async,
op_fs_file_stat_sync,
+ op_fs_file_truncate_async,
op_fs_flock_async,
op_fs_flock_sync,
op_fs_fsync_async,
op_fs_fsync_sync,
- op_fs_ftruncate_async,
op_fs_ftruncate_sync,
op_fs_funlock_async,
op_fs_funlock_async_unstable,
@@ -422,14 +422,6 @@ function coerceLen(len) {
return len;
}
-function ftruncateSync(rid, len) {
- op_fs_ftruncate_sync(rid, coerceLen(len));
-}
-
-async function ftruncate(rid, len) {
- await op_fs_ftruncate_async(rid, coerceLen(len));
-}
-
function truncateSync(path, len) {
op_fs_truncate_sync(path, coerceLen(len));
}
@@ -655,11 +647,11 @@ class FsFile {
}
truncate(len) {
- return ftruncate(this.#rid, len);
+ return op_fs_file_truncate_async(this.#rid, coerceLen(len));
}
truncateSync(len) {
- return ftruncateSync(this.#rid, len);
+ return op_fs_ftruncate_sync(this.#rid, coerceLen(len));
}
read(p) {
@@ -962,8 +954,6 @@ export {
FsFile,
fsync,
fsyncSync,
- ftruncate,
- ftruncateSync,
funlock,
funlockSync,
link,