From 114ec3c1f71b40bd4bba473b0187e7c664ed1755 Mon Sep 17 00:00:00 2001 From: Hirotaka Tagawa / wafuwafu13 Date: Wed, 24 May 2023 20:18:13 +0100 Subject: feat(ext/fs): add isBlockDevice, isCharDevice, isFifo, isSocket to FileInfo (#19008) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `isFile`, `isDirectory`, `isSymlink` are defined in `Deno.FileInfo`, but `isBlockDevice`, `isCharacterDevice`, `isFIFO`, `isSocket` are not defined. --------- Co-authored-by: Bartek IwaƄczuk --- cli/tests/unit/stat_test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cli/tests/unit') diff --git a/cli/tests/unit/stat_test.ts b/cli/tests/unit/stat_test.ts index f386fd92f..69730d439 100644 --- a/cli/tests/unit/stat_test.ts +++ b/cli/tests/unit/stat_test.ts @@ -307,6 +307,10 @@ Deno.test( assert(s.rdev === null); assert(s.blksize === null); assert(s.blocks === null); + assert(s.isBlockDevice === null); + assert(s.isCharDevice === null); + assert(s.isFifo === null); + assert(s.isSocket === null); }, ); @@ -334,5 +338,9 @@ Deno.test( assert(s.rdev !== null); assert(s.blksize !== null); assert(s.blocks !== null); + assert(!s.isBlockDevice); + assert(!s.isCharDevice); + assert(!s.isFifo); + assert(!s.isSocket); }, ); -- cgit v1.2.3