Skip to content

Conversation

wafuwafu13
Copy link
Contributor

@wafuwafu13 wafuwafu13 commented Sep 28, 2022

std::os::unix::fs::FileTypeExt is defined in Rust.
isFile, isDirectory, isSymlink are defined in Deno.FileInfo, but isBlockDevice, isCharacterDevice, isFIFO, isSocket are not defined.
These are defined in Node.js fs.Stats, and it is good to be defined in Deno.FileInfo to improve compatibility.
In this PR, isBlockDevice is defined. If this PR is approved, I will add isCharacterDevice, isFIFO, isSocket as well in next PR.

@wafuwafu13 wafuwafu13 marked this pull request as draft September 28, 2022 08:36
@wafuwafu13 wafuwafu13 marked this pull request as ready for review September 29, 2022 01:04
Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in favour.

Although I should point out that we have too many fields in FileInfo. Deno does not have an API for exists / access. Those cases will use Deno.stat and won't be accessing these meta fields at all.

Copy link
Contributor

@aapoalas aapoalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM: Can you rebase this?

Copy link
Contributor

@aapoalas aapoalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires a rebase.

@wafuwafu13
Copy link
Contributor Author

wafuwafu13 commented Apr 4, 2023

@aapoalas
I retry at #19008
I apologize for the delayed response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants