Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement mode field of Deno.FileInfo on Windows #18053

Closed
lucacasonato opened this issue Mar 6, 2023 · 2 comments · Fixed by #18073
Closed

Implement mode field of Deno.FileInfo on Windows #18053

lucacasonato opened this issue Mar 6, 2023 · 2 comments · Fixed by #18073
Labels
bug Something isn't working node compat runtime Relates to code in the runtime crate windows Related to Windows platform

Comments

@lucacasonato
Copy link
Member

Right now the mode field is completely un-populated on Windows.

On Node, it is always 0 (libuv todo, hey @piscisaureus!)

On Go, it is reasonably populated. The mode very realistically emulates Unix. Code here

I think we should populate them like Go does.

@lucacasonato
Copy link
Member Author

I'm running into some Node compat issues because of this. Can we populate it as 0 in node:fs for now also?

@lucacasonato lucacasonato added bug Something isn't working windows Related to Windows platform node compat runtime Relates to code in the runtime crate labels Mar 6, 2023
@piscisaureus
Copy link
Member

Yes let's do 0.

There is a tradeoff here - we can emulate unix more diligently but you end up making a lot more syscalls (slow!) and it's still probably not very useful.

bartlomieju added a commit that referenced this issue Mar 16, 2023
This commit adds support for retrieving `dev` information
when stating files on Windows.

Additionally `Deno.FileInfo` interfaces was changed to always
return 0 for fields that we don't retrieve information for on Windows.

Closes #18053

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working node compat runtime Relates to code in the runtime crate windows Related to Windows platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants